Skip to content

Commit

Permalink
Assign sync_hdfstore to a variable and close it
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Oct 16, 2024
1 parent f379754 commit e33abd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tardis/spectrum/tests/test_spectrum_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tardis/tests/test_tardis_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tardis/tests/test_tardis_full_formal_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e33abd6

Please sign in to comment.