class_docstr: Unit tests for distributions in continuous.py 
class_docstr_tok: ["Unit","tests","for","distributions","in","continuous.py"]
docstr: Tests random sampling from Continuous Uniform 
docstr_tok: ["Tests","random","sampling","from","Continuous","Uniform"]
code: def test_rand_sampling_uniform(self):
      """Tests random sampling from Continuous Uniform"""
      self.report(
          "Test random sampling of Continuous Uniform Distribution."
      )
      lower = -5
      upper = 5
      dist = ContinuousUniform(lower, upper)
      mean = dist.get_mean()
      var = dist.get_variance()
      samples = dist.draw_samples("random", self.size)
      mean_r = self._compute_mean(samples)
      var_r = self._compute_variance(samples)
      self._check_sample_sizes(samples)
      assert abs(mean - mean_r) <= self.threshold
      assert abs(var - var_r) <= self.threshold
      self.report(
          "%s, mean=%0.3f, variance=%0.3f :: test result: mean=%0.3f, "
          "variance=%0.3f" % (str(dist), mean, var, mean_r, var_r),
          "test_result",
      )
  
file_path: dragonfly/dragonfly/distributions/unittest_continuous.py
imports: from __future__ import absolute_import
  import unittest
  import numpy
  import warnings
  from .continuous import Beta, ContinuousUniform, Exponential, Normal, MultivariateGaussian
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 9 for calling the ContinuousDistributionsTestCase obj's underlying member method code with example usage: obj.test_rand_sampling_uniform() without return types