@@ -160,21 +160,25 @@ def test_generate_measurements_eot(self, eot_sampling_style: str):
160160 )
161161 )
162162
163+ def _generate_simulated_scenario_data (self ):
164+ """Helper that actually generates the data and returns it."""
165+ self .simulation_param ["all_seeds" ] = range (self .n_runs_default )
166+ groundtruths , measurements = generate_simulated_scenarios (self .simulation_param )
167+ return groundtruths , measurements
168+
163169 @unittest .skipIf (
164170 pyrecest .backend .__backend_name__ == "jax" ,
165171 reason = "Not supported on this backend" ,
166172 )
167173 def test_generate_simulated_scenario (self ):
168- self .simulation_param ["all_seeds" ] = range (self .n_runs_default )
169- groundtruths , measurements = generate_simulated_scenarios (self .simulation_param )
174+ groundtruths , measurements = self ._generate_simulated_scenario_data ()
170175
171176 self .assertEqual (
172177 np .shape (groundtruths ), (self .n_runs_default , self .n_timesteps_default )
173178 )
174179 self .assertEqual (
175180 np .shape (measurements ), (self .n_runs_default , self .n_timesteps_default )
176181 )
177- return groundtruths , measurements
178182
179183 def test_determine_all_deviations (self ):
180184 def dummy_extract_mean (x ):
@@ -341,7 +345,7 @@ def test_get_axis_label(self):
341345 reason = "Not supported on this backend" ,
342346 )
343347 def test_iterate_configs_and_runs (self , filter_configs ):
344- groundtruths , measurements = self .test_generate_simulated_scenario ()
348+ groundtruths , measurements = self ._generate_simulated_scenario_data ()
345349 evaluation_config = {
346350 "plot_each_step" : False ,
347351 "convert_to_point_estimate_during_runtime" : False ,
0 commit comments