3737
3838class TestPowerMonitoring (BaseTestCase ):
3939
40- def assert_report (self , n_run : int ) -> None :
41- path = get_report_path ("path_energy_report" , n_run = n_run )
40+ def assert_report (self ) -> None :
41+ path = get_report_path ("path_energy_report" )
4242 if not os .path .exists (path ):
43- raise AssertionError (f"Unable to find report for run { n_run } " )
43+ raise AssertionError (f"Unable to find report" )
4444
4545 def do_run (self ) -> None :
4646 synfire_run .do_run (n_neurons , neurons_per_core = neurons_per_core ,
@@ -54,9 +54,7 @@ def do_run(self) -> None:
5454 self .assertIsNotNone (hist , "must have a histogram" )
5555
5656 # Did we build the report file like we asked for in config file?
57- self .assert_report (1 )
58- self .assert_report (2 )
59- self .assert_report (3 )
57+ self .assert_report ()
6058
6159 # Did we output power provenance data, as requested?
6260 exec_times = set ()
@@ -66,7 +64,8 @@ def do_run(self) -> None:
6664 "FROM power_provenance "
6765 "WHERE description = 'Exec time (seconds)'" ):
6866 exec_times .add (row [0 ])
69- self .assertEqual (exec_times , set ([0.01 , 0.03 , 0.06 ]))
67+ # combined
68+ self .assertEqual (exec_times , set ([0.06 ]))
7069
7170 def test_power_monitoring (self ) -> None :
7271 self .runsafe (self .do_run )
0 commit comments