diff --git a/tardis/conftest.py b/tardis/conftest.py index 169441e07ce..298b9d2c6f8 100644 --- a/tardis/conftest.py +++ b/tardis/conftest.py @@ -96,6 +96,11 @@ def tardis_ref_path(): def atomic_data_fname(tardis_ref_path): atomic_data_fname = os.path.join( tardis_ref_path, 'atom_data', 'kurucz_cd23_chianti_H_He.h5') + + assert os.path.exists(atomic_data_fname), ("{0} atomic datafiles" + " does not seem to " + "exist".format( + atomic_data_fname)) return atomic_data_fname diff --git a/tardis/plasma/tests/test_plasmas_full.py b/tardis/plasma/tests/test_plasmas_full.py index df0d8f09cbf..a91762c60eb 100644 --- a/tardis/plasma/tests/test_plasmas_full.py +++ b/tardis/plasma/tests/test_plasmas_full.py @@ -26,10 +26,6 @@ class TestPlasmas(): @classmethod @pytest.fixture(scope="class", autouse=True) def setup(self, atomic_data_fname): - assert os.path.exists(atomic_data_fname), ("{0} atomic datafiles" - " does not seem to " - "exist".format( - atomic_data_fname)) self.config_yaml = yaml_load_config_file( 'tardis/plasma/tests/data/plasma_test_config_lte.yml') self.config_yaml['atom_data'] = atomic_data_fname diff --git a/tardis/tests/test_atomic.py b/tardis/tests/test_atomic.py index 152e3f9c9a3..c009cd03d02 100644 --- a/tardis/tests/test_atomic.py +++ b/tardis/tests/test_atomic.py @@ -137,10 +137,6 @@ def test_atomic_symbol_reverse(): def test_atomic_reprepare(atomic_data_fname): - assert os.path.exists(atomic_data_fname), ("{0} atomic datafiles " - "does not seem to " - "exist".format( - atomic_data_fname)) atom_data = atomic.AtomData.from_hdf5(atomic_data_fname) atom_data.prepare_atom_data([14]) assert len(atom_data.lines) > 0 diff --git a/tardis/tests/test_tardis_full.py b/tardis/tests/test_tardis_full.py index c1c21778b85..7fd44de8dee 100644 --- a/tardis/tests/test_tardis_full.py +++ b/tardis/tests/test_tardis_full.py @@ -22,10 +22,6 @@ class TestSimpleRun(): @classmethod @pytest.fixture(scope="class", autouse=True) def setup(self, atomic_data_fname): - assert os.path.exists(atomic_data_fname), ("{0} atomic datafiles" - " does not seem to " - "exist".format( - atomic_data_fname)) self.config_yaml = yaml_load_config_file( 'tardis/io/tests/data/tardis_configv1_verysimple.yml') self.config_yaml['atom_data'] = atomic_data_fname