Skip to content

Commit 45b28a7

Browse files
committed
update unit test of HeteroskedasticNoise
1 parent 45a96e8 commit 45b28a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/likelihoods/test_noise_models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ class TestNoiseModels(unittest.TestCase):
2828
def test_heteroskedasticnoise_error(self):
2929
noise_model = NumericallyUnstableModelExample().to(torch.double)
3030
likelihood = HeteroskedasticNoise(noise_model)
31-
assert noise_model.training and likelihood.training
31+
self.assertEqual(noise_model.training, True)
32+
self.assertEqual(likelihood.training, True)
3233
noise_model.fail_arithmetic = True
3334
test_x = torch.tensor([[3.0]])
34-
self.assertRaises(ArithmeticError, likelihood, test_x)
35+
with self.assertRaises(ArithmeticError):
36+
likelihood(test_x)
37+
self.assertEqual(likelihood.training, True)
3538
likelihood(test_x)

0 commit comments

Comments
 (0)