From 67082d64d53f4d9e3bbf270173f92799e19e31f7 Mon Sep 17 00:00:00 2001 From: Codex GPT-5 Date: Sun, 12 Jul 2026 15:58:55 +0200 Subject: [PATCH] test: skip relative config include across Windows drives 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 --- test/test_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_config.py b/test/test_config.py index 897caba4c..c4e39db48 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -320,6 +320,9 @@ def test_config_relative_path_include(self, rw_dir): with GitConfigParser(config_path, read_only=False) as cw: cw.set_value("include", "path", "included") + if osp.splitdrive(config_path)[0] != osp.splitdrive(os.getcwd())[0]: + pytest.skip("The temporary directory and checkout are on different drives") + relative_config_path = osp.relpath(config_path) with GitConfigParser(relative_config_path, read_only=True) as cr: assert cr.get_value("included", "value") == "included"