From 6cbcbfad59ff33aeeb99f188439bbb8d360fc639 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 29 Jun 2023 10:02:26 +0100 Subject: [PATCH] expanded pytest raises on tests to each single case --- caimira/tests/models/test_dynamic_population.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/caimira/tests/models/test_dynamic_population.py b/caimira/tests/models/test_dynamic_population.py index abc8272c..8fe6b891 100644 --- a/caimira/tests/models/test_dynamic_population.py +++ b/caimira/tests/models/test_dynamic_population.py @@ -217,7 +217,11 @@ def test_dynamic_total_probability_rule( with pytest.raises(NotImplementedError, match=re.escape("Cannot compute total probability " "(including incidence rate) with dynamic occupancy")): dynamic_infected_single_exposure_model.total_probability_rule() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute total probability " + "(including incidence rate) with dynamic occupancy")): dynamic_exposed_single_exposure_model.total_probability_rule() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute total probability " + "(including incidence rate) with dynamic occupancy")): dynamic_population_exposure_model.total_probability_rule() def test_dynamic_expected_new_cases( @@ -228,7 +232,11 @@ def test_dynamic_expected_new_cases( with pytest.raises(NotImplementedError, match=re.escape("Cannot compute expected new cases " "with dynamic occupancy")): dynamic_infected_single_exposure_model.expected_new_cases() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute expected new cases " + "with dynamic occupancy")): dynamic_exposed_single_exposure_model.expected_new_cases() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute expected new cases " + "with dynamic occupancy")): dynamic_population_exposure_model.expected_new_cases() def test_dynamic_reproduction_number( @@ -239,5 +247,9 @@ def test_dynamic_reproduction_number( with pytest.raises(NotImplementedError, match=re.escape("Cannot compute reproduction number " "with dynamic occupancy")): dynamic_infected_single_exposure_model.reproduction_number() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute reproduction number " + "with dynamic occupancy")): dynamic_exposed_single_exposure_model.reproduction_number() + with pytest.raises(NotImplementedError, match=re.escape("Cannot compute reproduction number " + "with dynamic occupancy")): dynamic_population_exposure_model.reproduction_number()