Ejemplo n.º 1
0
 def test_get_g_from_covform():
     """
     Test that the _update_canform function is called before returning the g parameter.
     """
     gaussian_a = Gaussian(cov=2.0,
                           mean=1.0,
                           log_weight=0.0,
                           var_names=["a"])
     expect(Gaussian, times=1)._update_canform()
     gaussian_a.get_g()
     verifyNoUnwantedInteractions()
     unstub()
Ejemplo n.º 2
0
 def test_get_g(self):
     """
     Test that the correct g is returned.
     """
     gaussian_a = Gaussian(prec=2.0, h_vec=1.0, g_val=0.0, var_names=["a"])
     self.assertEqual(gaussian_a.get_g(), 0.0)