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 path separator inconsistency in crop_raster tests on Windows #926

Conversation

Abhishek-Dimri
Copy link
Contributor

This PR fixes the path separator inconsistency in the test_crop_raster_valid_crop and test_crop_raster_png_unprojected tests on Windows (Issue #924). The issue occurs because the crop_raster function returns paths with forward slashes (/), while the tests expect backslashes (\).

Changes:

  • Normalized both the result and expected_filename paths in the tests using os.path.normpath().
  • Ensured that the tests work correctly on all operating systems.

Testing:

  • Ran the test suite on Windows and confirmed that the tests pass:
    pytest -v

image

Copy link
Member

@ethanwhite ethanwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @Abhishek-Dimri!

@ethanwhite ethanwhite merged commit 95c04d5 into weecology:main Feb 17, 2025
4 checks passed
@Abhishek-Dimri
Copy link
Contributor Author

Thank you, @ethanwhite , for reviewing and merging the PR! I'm glad I could contribute to the project. Looking forward to helping out with more issues in the future! 😊

@Abhishek-Dimri Abhishek-Dimri deleted the fix/path-separator-inconsistency-crop-raster-tests branch February 17, 2025 15:04
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.

2 participants