diff --git a/tardis/spectrum/tests/test_spectrum_solver.py b/tardis/spectrum/tests/test_spectrum_solver.py index de227ea75e5..941a34eefa0 100644 --- a/tardis/spectrum/tests/test_spectrum_solver.py +++ b/tardis/spectrum/tests/test_spectrum_solver.py @@ -32,10 +32,10 @@ def simulation( simulation.run_final() request.cls.regression_data = RegressionData(request) - request.cls.regression_data.sync_hdf_store(simulation) + data = request.cls.regression_data.sync_hdf_store(simulation) yield simulation - request.cls.regression_data.close() + data.close() def get_expected_data(self, key: str): return pd.read_hdf(self.regression_data.fpath, key) diff --git a/tardis/tests/test_tardis_full.py b/tardis/tests/test_tardis_full.py index f370a25ab52..80ac724a84d 100644 --- a/tardis/tests/test_tardis_full.py +++ b/tardis/tests/test_tardis_full.py @@ -55,10 +55,10 @@ def simulation( simulation.run_final() request.cls.regression_data = RegressionData(request) - request.cls.regression_data.sync_hdf_store(simulation) + data = request.cls.regression_data.sync_hdf_store(simulation) yield simulation - request.cls.regression_data.close() + data.close() def get_expected_data(self, key: str): return pd.read_hdf(self.regression_data.fpath, key) diff --git a/tardis/tests/test_tardis_full_formal_integral.py b/tardis/tests/test_tardis_full_formal_integral.py index 74951df4612..ca3024047ff 100644 --- a/tardis/tests/test_tardis_full_formal_integral.py +++ b/tardis/tests/test_tardis_full_formal_integral.py @@ -73,8 +73,8 @@ def simulation(self, config, atomic_data_fname): def test_simulation(self, simulation, request): regression_data = RegressionData(request) container = SimulationContainer(simulation) - regression_data.sync_hdf_store(container) - regression_data.close() + data = regression_data.sync_hdf_store(container) + data.close() def test_j_blue_estimators(self, simulation, request): regression_data = RegressionData(request)