Skip to content

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

Merged
echoix merged 1 commit into
OSGeo:mainfrom
echoix:grassdb-test-manage-windows-os-sep
Oct 11, 2026
Merged

echoix merged 1 commit into
OSGeo:mainfrom
echoix:grassdb-test-manage-windows-os-sep

Conversation

@echoix

@echoix echoix commented Oct 11, 2026

Copy link
Copy Markdown
Member

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 #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.

…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.
@github-actions github-actions Bot added Python Related code is in Python libraries tests Related to Test Suite labels Oct 11, 2026
@echoix
echoix force-pushed the grassdb-test-manage-windows-os-sep branch from 8e0fc52 to 11a2a2b Compare October 11, 2026 11:47
@echoix
echoix requested a review from ninsbl October 11, 2026 11:47
@echoix echoix changed the title grass.grassdb: Fix path separator expectations in manage tests on Windows- #737 grass.grassdb: Fix path separator expectations in manage tests on Windows Oct 11, 2026
@echoix
echoix enabled auto-merge (squash) October 11, 2026 11:53
@echoix
echoix merged commit 14034bb into OSGeo:main Oct 11, 2026
27 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants