Fix stale perlin coords test left red by #3470#3489
Merged
Conversation
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.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mainis red.test_perlin_drops_input_coordsasserts perlin drops input coordinates:But #3470 ("perlin: preserve input x/y coordinates on the output") changed
perlin()to keep them (coords=agg.coordsinperlin.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_coordsand 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 passedSurfaced while merging main into the
from_templatebranch (#3487); this is the only check blocking that PR.