From 036b27327825b57750b78cc9a30b0ba399e7b2b8 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Mon, 19 Aug 2024 12:59:59 -0400 Subject: [PATCH 1/2] Use a different bad star for bad star test --- sparkles/tests/test_checks.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sparkles/tests/test_checks.py b/sparkles/tests/test_checks.py index ba08bcc..172a77d 100644 --- a/sparkles/tests/test_checks.py +++ b/sparkles/tests/test_checks.py @@ -745,9 +745,8 @@ def test_imposters_on_guide(exp_warn, aca_review_table): @pytest.mark.parametrize("aca_review_table", (ACAReviewTable, ACACheckTable)) -def test_bad_star_set(proseco_agasc_1p7, aca_review_table): - # This faint star is no longer in proseco_agasc >= 1.8 so we use 1.7 - bad_id = 1248994952 +def test_bad_star_set(aca_review_table): + bad_id = 260713672 star = agasc.get_star(bad_id) ra = star["RA"] dec = star["DEC"] @@ -760,17 +759,13 @@ def test_bad_star_set(proseco_agasc_1p7, aca_review_table): check_catalog(acar) assert acar.messages == [ { - "text": "Guide star 1248994952 does not meet guide candidate criteria", - "category": "critical", - "idx": 5, - }, - { - "text": "Star 1248994952 is in proseco bad star set", + "text": f"Star {bad_id} is in proseco bad star set", "category": "critical", "idx": 5, }, + {'category': 'warning', 'text': 'P2: 2.39 less than 3.0 for OR'}, {"text": "OR requested 0 fids but 3 is typical", "category": "caution"}, - {"category": "info", "text": "included guide ID(s): [1248994952]"}, + {"category": "info", "text": f"included guide ID(s): [{bad_id}]"}, ] From 6a5fef42d6169c08a602c213e1995990bc233f32 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Mon, 19 Aug 2024 13:02:27 -0400 Subject: [PATCH 2/2] Fix quotes --- sparkles/tests/test_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparkles/tests/test_checks.py b/sparkles/tests/test_checks.py index 172a77d..cb5d306 100644 --- a/sparkles/tests/test_checks.py +++ b/sparkles/tests/test_checks.py @@ -763,7 +763,7 @@ def test_bad_star_set(aca_review_table): "category": "critical", "idx": 5, }, - {'category': 'warning', 'text': 'P2: 2.39 less than 3.0 for OR'}, + {"category": "warning", "text": "P2: 2.39 less than 3.0 for OR"}, {"text": "OR requested 0 fids but 3 is typical", "category": "caution"}, {"category": "info", "text": f"included guide ID(s): [{bad_id}]"}, ]