Beispiel #1
0
 def test_minutely_emissions_generate_performance_stats_for_last_day(self):
     params = factory.create_simulation_parameters(num_days=1,
                                                   data_frequency='minute',
                                                   emission_rate='minute')
     algo = NoopAlgorithm(sim_params=params)
     algo.run(source=[])
     self.assertEqual(algo.perf_tracker.day_count, 1.0)
Beispiel #2
0
 def test_minutely_emissions_generate_performance_stats_for_last_day(self):
     params = factory.create_simulation_parameters(num_days=1,
                                                   data_frequency='minute',
                                                   emission_rate='minute')
     with patch.object(BenchmarkSource, "get_value",
                       self.fake_minutely_benchmark):
         algo = NoopAlgorithm(sim_params=params, env=self.env)
         algo.run(FakeDataPortal(self.env))
         self.assertEqual(len(algo.perf_tracker.sim_params.sessions), 1)