def test_bad_data_retrieval(): with pytest.raises(RuntimeError) as e: get_catalogue_data('badplanetname') assert 'planet model' in str(e)
def test_data_from_catalogue(): results = get_catalogue_data('WASP-12b') assert type(results) == PyModel assert check_close(results.period, 1.09, 0.1)