From ca0cc1a2b68d534bb54575241e5432b565d85b0b Mon Sep 17 00:00:00 2001 From: mcmcgrath13 Date: Thu, 18 Mar 2021 15:57:00 -0400 Subject: [PATCH 1/2] test: reset trackers between calls to update_all_agents --- tests/model_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/model_test.py b/tests/model_test.py index 2e7b3b90..7e9231b6 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -29,7 +29,7 @@ def test_model_init(params): assert model.pop.pop_seed > 0 -@pytest.mark.unit +@pytest.mark.unit_broken def test_update_all_agents(make_model, make_agent): # make agent 0 model = make_model() @@ -54,6 +54,8 @@ def test_update_all_agents(make_model, make_agent): for k in agent.target_partners.keys(): agent.target_partners[k] = 0 + model.reset_trackers() + with pytest.raises(ValueError) as excinfo: model.update_all_agents() assert "No agent zero!" in str(excinfo) From 988202140c0af33c7c7ba05e548336531878b852 Mon Sep 17 00:00:00 2001 From: mcmcgrath13 Date: Thu, 18 Mar 2021 16:54:17 -0400 Subject: [PATCH 2/2] test: revert mark to unit --- tests/model_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/model_test.py b/tests/model_test.py index 7e9231b6..0ee048ac 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -29,7 +29,7 @@ def test_model_init(params): assert model.pop.pop_seed > 0 -@pytest.mark.unit_broken +@pytest.mark.unit def test_update_all_agents(make_model, make_agent): # make agent 0 model = make_model()