Skip to content

Commit

Permalink
blackify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
epassaro committed Jan 21, 2021
1 parent f2e82f8 commit 8522e7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion tardis/plasma/tests/test_complete_plasmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def plasma(self, request, chianti_he_db_fpath, config, tardis_ref_data):
config["atom_data"] = chianti_he_db_fpath
sim = Simulation.from_config(config)
if request.config.getoption("--generate-reference"):
sim.plasma.to_hdf(tardis_ref_data, path=config.plasma.save_path, overwrite=True)
sim.plasma.to_hdf(
tardis_ref_data, path=config.plasma.save_path, overwrite=True
)
pytest.skip("Reference data saved at {0}".format(tardis_ref_data))
return sim.plasma

Expand Down
12 changes: 9 additions & 3 deletions tardis/simulation/tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ def simulation_one_loop(
"output_nu",
"output_energy",
]
simulation.to_hdf(tardis_ref_data, "", "test_simulation", overwrite=True)
simulation.model.to_hdf(tardis_ref_data, "", "test_simulation", overwrite=True)
simulation.runner.to_hdf(tardis_ref_data, "", "test_simulation", overwrite=True)
simulation.to_hdf(
tardis_ref_data, "", "test_simulation", overwrite=True
)
simulation.model.to_hdf(
tardis_ref_data, "", "test_simulation", overwrite=True
)
simulation.runner.to_hdf(
tardis_ref_data, "", "test_simulation", overwrite=True
)
pytest.skip("Reference data was generated during this run.")


Expand Down
4 changes: 3 additions & 1 deletion tardis/tests/test_tardis_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def runner(self, atomic_data_fname, tardis_ref_data, generate_reference):
"spectrum",
"spectrum_virtual",
]
simulation.runner.to_hdf(tardis_ref_data, "", self.name, overwrite=True)
simulation.runner.to_hdf(
tardis_ref_data, "", self.name, overwrite=True
)
pytest.skip("Reference data was generated during this run.")

@pytest.fixture(scope="class")
Expand Down

0 comments on commit 8522e7c

Please sign in to comment.