Skip to content

Commit

Permalink
Black formatting applied to tests
Browse files Browse the repository at this point in the history
blackify tests
  • Loading branch information
andrewfullard authored Jan 21, 2021
2 parents 98a6840 + 8522e7c commit 7d7c4bc
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 7d7c4bc

Please sign in to comment.