Skip to content

grass.grassdb: Fix path separator expectations in manage tests on Windows - #737

Closed
echoix wants to merge 1 commit into
mainfrom
grassdb-test-manage-windows-os-sep
Closed

echoix wants to merge 1 commit into
mainfrom
grassdb-test-manage-windows-os-sep

Conversation

@echoix

@echoix echoix commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Description

pathlib uses os.sep in the string form of paths, so four tests in python/grass/grassdb/testsuite/test_manage.py failed on Windows when comparing against forward-slash strings. The expected values now use os.sep, and the @xfail_windows markers on these four tests are removed.

Extracted from OSGeo#2616 (originally by @ninsbl, authorship kept in the commit). Part of the checklist in that PR's description.

Motivation and context

Removes four expected failures on Windows by fixing the tests rather than marking them.

How has this been tested?

ruff check and ruff format --check pass. On Linux/macOS, os.sep is /, so the assertions are unchanged. The fix needs a run on Windows (gunittest on OSGeo4W) to confirm that the four tests pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Generated by Claude Code

@echoix

echoix commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

It's not opened on osgeo/grass yet, I was testing it here

@ninsbl

ninsbl commented Oct 11, 2026

Copy link
Copy Markdown

Did not realise this was against your fork. I will approve in the GRASS repo as soon as you open there and tests pass here...

@echoix

echoix commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

It's so fun to use AI to do the boring work that is just missing time to do; or to finish work that was started but never finished.

…dows

pathlib uses os.sep in the string form of paths, so the tests that
compare against forward-slash strings failed on Windows. Compare against
the same strings with os.sep and drop the xfail_windows markers from the
four tests which this fixes.

Extracted from OSGeo#2616 by Stefan Blumentrath.
@echoix
echoix force-pushed the grassdb-test-manage-windows-os-sep branch from 8e0fc52 to 11a2a2b Compare October 11, 2026 11:47
@echoix echoix closed this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants