Skip to content

Commit

Permalink
TST: check for specific error message when calling `get_all_injection…
Browse files Browse the repository at this point in the history
…_credible_levels`
  • Loading branch information
mj-will committed Feb 10, 2025
1 parent 187f0f8 commit 12eae6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/core/result_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,11 @@ def test_get_credible_levels(self):

def test_get_credible_levels_raises_error_if_no_injection_parameters(self):
self.result.injection_parameters = None
with self.assertRaises(TypeError):
with self.assertRaises(TypeError) as error_context:
self.result.get_all_injection_credible_levels()
self.assertTrue(
"Result object has no 'injection_parameters" in str(error_context.exception)
)

def test_kde(self):
kde = self.result.kde
Expand Down

0 comments on commit 12eae6c

Please sign in to comment.