MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / test_run_once

Method test_run_once

tests/control/test_rbc.py:25–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23 self.assertLessEqual(element_1.marginal_cost, element_2.marginal_cost)
24
25 def test_run_once(self):
26 rbc = deepcopy(self.rbc)
27
28 self.assertEqual(len(rbc.microgrid.log), 0)
29
30 n_steps = 10
31
32 log = rbc.run(n_steps)
33
34 self.assertEqual(len(log), n_steps)
35 self.assertEqual(log, rbc.microgrid.log)
36 return rbc
37
38 def test_reset_after_run(self):
39 rbc = self.test_run_once()

Callers 1

test_reset_after_runMethod · 0.95

Calls 2

assertEqualMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected