Ejemplo n.º 1
0
    def setup(self):
        self.atom_data_filename = os.path.expanduser(
            os.path.expandvars(pytest.config.getvalue('atomic-dataset')))
        assert os.path.exists(
            self.atom_data_filename), ("{0} atomic datafiles"
                                       " does not seem to "
                                       "exist".format(self.atom_data_filename))
        self.config_yaml = yaml.load(
            open('tardis/io/tests/data/tardis_configv1_verysimple.yml'))
        self.config_yaml['atom_data'] = self.atom_data_filename

        tardis_config = Configuration.from_config_dict(self.config_yaml)
        self.model = Radial1DModel(tardis_config)
        self.simulation = Simulation(tardis_config)

        self.simulation.legacy_run_simulation(self.model)