Skip to content

Commit

Permalink
Merge pull request #191 from sot/supp-bad-star-change-class
Browse files Browse the repository at this point in the history
Handle bad stars from supplement in one test
  • Loading branch information
jeanconn authored Sep 25, 2024
2 parents 686aa3f + 4df95af commit 2eeddf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agasc/tests/test_agasc_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,14 @@ def test_supplement_get_agasc_cone():
)
ok = stars2["MAG_CATID"] == agasc.MAG_CATID_SUPPLEMENT

change_names = ["MAG_CATID", "COLOR1", "MAG_ACA", "MAG_ACA_ERR"]
change_names = ["MAG_CATID", "COLOR1", "MAG_ACA", "MAG_ACA_ERR", "CLASS"]
for name in set(stars1.colnames) - set(change_names):
assert np.all(stars1[name] == stars2[name])

# For CLASS the only ones that are different should have the "bad" class 100
class_nok = stars2["CLASS"] != stars1["CLASS"]
assert np.all(stars2["CLASS"][class_nok] == 100)

assert not np.any(stars1["MAG_CATID"] == agasc.MAG_CATID_SUPPLEMENT)

# At least 35 stars in this field observed
Expand Down

0 comments on commit 2eeddf0

Please sign in to comment.