Skip to content

Commit

Permalink
Fix smoke test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed May 10, 2024
1 parent b6bef6d commit e4ae3d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/lsdb/catalog/test_crossmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def test_kdtree_crossmatch(small_sky_catalog_cloud, small_sky_xmatch_catalog_clo
).compute()
assert len(xmatched) == len(xmatch_correct_cloud)
for _, correct_row in xmatch_correct_cloud.iterrows():
assert correct_row["small_sky_id"] in xmatched["id_small_sky"].values
assert correct_row["small_sky_id"] in xmatched["id_small_sky"].to_numpy()
xmatch_row = xmatched[xmatched["id_small_sky"] == correct_row["small_sky_id"]]
assert xmatch_row["id_small_sky_xmatch"].values == correct_row["xmatch_id"]
assert xmatch_row["_dist_arcsec"].values == pytest.approx(correct_row["dist_arcsec"])
assert xmatch_row["id_small_sky_xmatch"].to_numpy() == correct_row["xmatch_id"]
assert xmatch_row["_dist_arcsec"].to_numpy() == pytest.approx(correct_row["dist_arcsec"])


def test_crossmatch_with_margin(
Expand All @@ -34,10 +34,10 @@ def test_crossmatch_with_margin(
).compute()
assert len(xmatched) == len(xmatch_with_margin)
for _, correct_row in xmatch_with_margin.iterrows():
assert correct_row["small_sky_order1_id"] in xmatched["id_small_sky_order1"].values
assert correct_row["small_sky_order1_id"] in xmatched["id_small_sky_order1"].to_numpy()
xmatch_row = xmatched[
(xmatched["id_small_sky_order1"] == correct_row["small_sky_order1_id"])
& (xmatched["id_small_sky_xmatch"] == correct_row["xmatch_id"])
]
assert len(xmatch_row) == 1
assert xmatch_row["_dist_arcsec"].values == pytest.approx(correct_row["dist_arcsec"])
assert xmatch_row["_dist_arcsec"].to_numpy() == pytest.approx(correct_row["dist_arcsec"])

0 comments on commit e4ae3d6

Please sign in to comment.