Пример #1
0
 def test_bad_model(self):
     species = stdpopsim.get_species("HomSap")
     with mock.patch("stdpopsim.cli.exit", autospec=True) as mocked_exit:
         cli.get_model_wrapper(species, "XXX")
         mocked_exit.assert_called_once_with(
             "DemographicModel 'HomSap/XXX' not in catalog"
         )
Пример #2
0
 def test_bad_model(self):
     species = stdpopsim.get_species("HomSap")
     with mock.patch("stdpopsim.cli.exit", autospec=True) as mocked_exit:
         cli.get_model_wrapper(species, "XXX")
         available_models = ", ".join([dm.id for dm in species.demographic_models])
         mocked_exit.assert_called_once_with(
             f"DemographicModel 'HomSap/XXX' not in catalog ({available_models})"
         )