From 71f1317a4ef2472ac011d60457c53d4d6faa4864 Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Sat, 16 Dec 2023 09:13:03 -0500 Subject: [PATCH] Update sync_hdf_store method in RegressionData class --- tardis/plasma/tests/test_complete_plasmas.py | 3 +-- tardis/tests/fixtures/regression_data.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tardis/plasma/tests/test_complete_plasmas.py b/tardis/plasma/tests/test_complete_plasmas.py index 5c2cd6d9ffb..ed7d4428852 100644 --- a/tardis/plasma/tests/test_complete_plasmas.py +++ b/tardis/plasma/tests/test_complete_plasmas.py @@ -164,11 +164,10 @@ def plasma( self, chianti_he_db_fpath, config, - tardis_ref_data, ): config["atom_data"] = str(chianti_he_db_fpath) sim = Simulation.from_config(config) - self.regression_data.sync_hdf_store(sim.plasma) + self.regression_data.sync_hdf_store(sim.plasma, update_fname=False) return sim.plasma @pytest.mark.parametrize("attr", combined_properties) diff --git a/tardis/tests/fixtures/regression_data.py b/tardis/tests/fixtures/regression_data.py index 61edf9c4aec..e01179bef50 100644 --- a/tardis/tests/fixtures/regression_data.py +++ b/tardis/tests/fixtures/regression_data.py @@ -94,8 +94,9 @@ def sync_str(self, data): with fpath.open("r") as fh: return fh.read() - def sync_hdf_store(self, tardis_module): - self.fname = f"{self.fname_prefix}.h5" + def sync_hdf_store(self, tardis_module, update_fname=True): + if update_fname: + self.fname = f"{self.fname_prefix}.h5" if self.enable_generate_reference: self.fpath.parent.mkdir(parents=True, exist_ok=True) with pd.HDFStore(self.fpath, mode="w") as store: