Skip to content

Skip cross-drive relative config test on Windows#2171

Merged
Byron merged 1 commit into
mainfrom
fix-windows-tests
Jul 12, 2026
Merged

Skip cross-drive relative config test on Windows#2171
Byron merged 1 commit into
mainfrom
fix-windows-tests

Conversation

@Byron

@Byron Byron commented Jul 12, 2026

Copy link
Copy Markdown
Member

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Reported issue

On Windows, this test is failing. Maybe fix by not running it there:

FAILED test/test_config.py::TestBase::test_config_relative_path_include - ValueError: path is on mount 'C:', start on mount 'D:'\n= 1 failed, 700 passed, 45 skipped, 13 xfailed, 1 xpassed, 3 warnings in 305.88s (0:05:05) =\n```\n\n## Change\n\nSkip `test_config_relative_path_include` only when the temporary config and current working directory are on different drives. Same-drive Windows environments retain coverage.\n\n## Validation\n\n- `pytest -q test/test_config.py` (31 passed, 1 existing skip)\n- `ruff check test/test_config.py`\n- `ruff format --check test/test_config.py`\n- Codex review of `67082d64` (no findings)

On Windows, the writable temporary directory and the checkout can be on
different drives. os.path.relpath() raises ValueError for such paths before
GitConfigParser is exercised.

Skip this relative-path-specific test on Windows, where the test setup cannot
reliably construct the required relative path.

Validation:
- pytest -q test/test_config.py
- ruff check test/test_config.py
- ruff format --check test/test_config.py
Copilot AI review requested due to automatic review settings July 12, 2026 14:00
@Byron

Byron commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

Merging early as it should fix the windows test, and there don't seem to be many runners these days.

@Byron Byron merged commit 7a46dfc into main Jul 12, 2026
30 of 31 checks passed
@Byron Byron deleted the fix-windows-tests branch July 12, 2026 14:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a Windows-specific failure in test_config_relative_path_include caused by os.path.relpath() raising ValueError when the temporary directory and the current working directory are on different drives. It adds a conditional skip so the test is only skipped in the cross-drive scenario, preserving coverage when both are on the same drive.

Changes:

  • Add a runtime check comparing the drive of config_path vs the current working directory.
  • Skip the test when those drives differ to avoid relpath() cross-drive failures on Windows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/test_config.py
Comment on lines +323 to +324
if osp.splitdrive(config_path)[0] != osp.splitdrive(os.getcwd())[0]:
pytest.skip("The temporary directory and checkout are on different drives")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants