Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix smoke test failures #29

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])