Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
garethjns committed Aug 1, 2020
1 parent 2c59414 commit 5330597
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/integration/sim/test_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_default_sim_run(self):
history = sim.run()

# Assert
self.assertEqual(10, len(history['Turn score']))
self.assertEqual(10, len(history[self._test_field]))
self.assertEqual(10, sim._step)
self.assertEqual(10, len(sim.env.sds_env.history[self._test_field]))

Expand All @@ -52,7 +52,7 @@ def test_example_sim_run(self):
history = sim.run()

# Assert
self.assertEqual(100, len(history['Turn score']))
self.assertEqual(100, len(history[self._test_field]))
self.assertEqual(100, sim._step)
self.assertEqual(100, len(sim.env.sds_env.history[self._test_field]))

Expand All @@ -68,7 +68,7 @@ def test_example_sim_run_with_plotting(self):
sim.env.sds_env.replay()

# Assert
self.assertEqual(12, len(history['Turn score']))
self.assertEqual(12, len(history[self._test_field]))
self.assertEqual(12, sim._step)
self.assertEqual(12, len(sim.env.sds_env.history[self._test_field]))
self.assertEqual(12 + 1, len(glob.glob(os.path.join(sim.env.sds_env.environment_plotting.graph_path, "*.png"))))
Expand All @@ -85,7 +85,7 @@ def test_example_sim_run_with_extra_plotting(self):
sim.env.sds_env.replay()

# Assert
self.assertEqual(16, len(history['Turn score']))
self.assertEqual(16, len(history[self._test_field]))
self.assertEqual(16, sim._step)
self.assertEqual(16, len(sim.env.sds_env.history[self._test_field]))
self.assertEqual(16 + 1, len(glob.glob(os.path.join(sim.env.sds_env.environment_plotting.graph_path, "*.png"))))
2 changes: 1 addition & 1 deletion tests/unit/environment/test_disease.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_try_to_infect_with_non_infectious_source(self):
source_node = {"infected": 0}
target_node = {}

for i in range(10000):
for _ in range(10000):
target_node = disease.try_to_infect(source_node=source_node, target_node=target_node)

self.assertEqual(0, target_node.get("infected", 0))
Expand Down

0 comments on commit 5330597

Please sign in to comment.