示例#1
0
 def test_get_log_weight_from_canform():
     """
     Test that the _update_covform function is called before returning the log-weight parameter.
     """
     gaussian_a = Gaussian(prec=2.0, h_vec=1.0, g_val=0.0, var_names=["a"])
     expect(Gaussian, times=1)._update_covform()
     gaussian_a.get_log_weight()
     verifyNoUnwantedInteractions()
     unstub()
示例#2
0
 def test_get_log_weight(self):
     """
     Test that the correct log-weight is returned.
     """
     gaussian_a = Gaussian(cov=2.0,
                           mean=1.0,
                           log_weight=0.0,
                           var_names=["a"])
     self.assertEqual(gaussian_a.get_log_weight(), 0.0)