From 1603c83aa7956f6bf642d51dcc54ddfc59e893c2 Mon Sep 17 00:00:00 2001 From: wavehs <156133648+wavehs@users.noreply.github.com> Date: Tue, 24 Nov 2026 04:18:52 +0200 Subject: [PATCH] tests: resolve both sides of the Wine runner's working-directory check The fixture asserts that the child starts in the artifact folder. On Windows tempfile hands out the 8.3 name (RUNNER~1) while Path(__file__).resolve() returns the long one, so the assertion failed inside the child and the case reported exit 1 in the check job. Resolving the working directory too compares the folders, not their spellings; a child started elsewhere still fails. --- tests/test_run_wine_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_run_wine_tests.py b/tests/test_run_wine_tests.py index 13dd535654..93870b9d6c 100644 --- a/tests/test_run_wine_tests.py +++ b/tests/test_run_wine_tests.py @@ -525,7 +525,9 @@ def test_child_sees_eof_even_when_the_runner_has_input(self): def test_relative_root_launches_the_artifact_from_its_working_directory(self): (self.artifact / "check_cwd.py").write_text( - "from pathlib import Path\nassert Path.cwd() == Path(__file__).resolve().parent\n", + # resolve() on both sides: on Windows tempfile hands out the 8.3 name (RUNNER~1) and the module's + # path resolves to the long one, so the two spellings differ while naming one folder. + "from pathlib import Path\nassert Path.cwd().resolve() == Path(__file__).resolve().parent\n", encoding="utf-8", newline="\n") entry = ctest_entry("ok", self.command("check_cwd.py")) with contextlib.chdir(self.root):