Skip to content

Fix stale perlin coords test left red by #3470#3489

Merged
brendancol merged 1 commit into
mainfrom
fix-perlin-coords-test
Jun 25, 2026
Merged

Fix stale perlin coords test left red by #3470#3489
brendancol merged 1 commit into
mainfrom
fix-perlin-coords-test

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Problem

main is red. test_perlin_drops_input_coords asserts perlin drops input coordinates:

assert 'lat' not in out.coords
assert 'lon' not in out.coords

But #3470 ("perlin: preserve input x/y coordinates on the output") changed perlin() to keep them (coords=agg.coords in perlin.py). The behavior changed without the test being flipped, so the test now fails on every PR that merges main. The test's own comment already anticipated this: "Flip this to assert the coords ARE preserved once that is fixed."

Fix

Rename the test to test_perlin_preserves_input_coords and assert the coords are present and unchanged, matching the behavior #3470 shipped. No production code changes.

Test plan

  • pytest xrspatial/tests/test_perlin.py -> 31 passed
  • flake8 clean

Surfaced while merging main into the from_template branch (#3487); this is the only check blocking that PR.

perlin() now carries input coordinate variables to the output (#3470), but
test_perlin_drops_input_coords still asserted they were dropped, leaving main
red. Rename it to test_perlin_preserves_input_coords and assert the coords are
preserved and unchanged, which is what the test's own TODO called for.
@brendancol brendancol merged commit 33f6232 into main Jun 25, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant