Skip to content

Commit

Permalink
Fix for atomic_dataset used to create common Simulation hdf fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
vg3095 committed Jun 21, 2017
1 parent 930bc1c commit 2ef32f8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tardis/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def atomic_data_fname():
return os.path.expandvars(os.path.expanduser(atomic_data_fname))


@pytest.fixture(scope="session")
@pytest.fixture
def kurucz_atomic_data(atomic_data_fname):
atomic_data = AtomData.from_hdf5(atomic_data_fname)

Expand Down Expand Up @@ -136,7 +136,12 @@ def config_verysimple():
return config

@pytest.fixture(scope="session")
def simulation_verysimple(config_verysimple, kurucz_atomic_data):
sim = Simulation.from_config(config_verysimple, atom_data=kurucz_atomic_data)
def simulation_verysimple(config_verysimple, atomic_data_fname):
atomic_data = AtomData.from_hdf5(atomic_data_fname)
if atomic_data.md5 != '21095dd25faa1683f4c90c911a00c3f8':
pytest.skip('Need default Kurucz atomic dataset '
'(md5="21095dd25faa1683f4c90c911a00c3f8"')

sim = Simulation.from_config(config_verysimple, atom_data=atomic_data)
sim.iterate(4000)
return sim

0 comments on commit 2ef32f8

Please sign in to comment.