tests: resolve both sides of the Wine runner's working-directory check #107

Manually merged
github merged 1 commit from gh-pr/107/head into gh-pr/107/base 2026-11-26 08:44:41 +00:00
Owner

@⁠wavehs on GitHub · 2026-11-24 02:19 UTC · original
wavehs:tests-win-wine-cwd-resolve → main · +3 −1 · 1 files · 1 commits · merged 2026-11-24 03:10 UTC

Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for it. No open pull request touches this file.

Depends on: none.

What and why

The last failing file in the Windows check job is this one, and the failure is in the fixture, not in the runner:

FAIL: test_relative_root_launches_the_artifact_from_its_working_directory (tests/test_run_wine_tests.py:533)
AssertionError: 1 != 0 : [FAIL] ok
  exit 1 in 0.0 s
  Traceback (most recent call last):
    File "C:\Users\RUNNER~1\...\artifact\check_cwd.py", line 2, in <module>
      assert Path.cwd() == Path(__file__).resolve().parent

tempfile hands out the 8.3 name on Windows (RUNNER~1), and the right-hand side is resolved, so the two spellings name one folder but compare unequal — the child fails its own assertion. The fixture used to check that the runner starts the artifact in its own folder, and that is still what it checks: resolving the working directory compares the folders. A child that started somewhere else still fails the assertion.

(For the record, the no Wine prefix at ... no-prefix: drive d: not mapped line in the same output is the deliberate note from MainTest.setUp keeping the run away from ~/.wine; it is not what failed.)

Tested

macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:

tree tests/test_run_wine_tests.py
main@9ec34cdff OK (POSIX: the two spellings already match)
this commit OK

The Windows failure itself is the check job log quoted above (9ec34cdff, run 45306800350, job 138157329747); the resolved comparison is the same tempfile 8.3 shape fixed for other files in #69 and #75. Not run on Windows.

compileall clean, check_no_game_data.py clean.

AI-assisted: yes.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: test-only.)
**@⁠wavehs** on GitHub · 2026-11-24 02:19 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/107) `wavehs:tests-win-wine-cwd-resolve` → `main` · +3 −1 · 1 files · 1 commits · merged 2026-11-24 03:10 UTC Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for it. No open pull request touches this file. Depends on: none. ### What and why The last failing file in the Windows `check` job is this one, and the failure is in the fixture, not in the runner: ``` FAIL: test_relative_root_launches_the_artifact_from_its_working_directory (tests/test_run_wine_tests.py:533) AssertionError: 1 != 0 : [FAIL] ok exit 1 in 0.0 s Traceback (most recent call last): File "C:\Users\RUNNER~1\...\artifact\check_cwd.py", line 2, in <module> assert Path.cwd() == Path(__file__).resolve().parent ``` `tempfile` hands out the 8.3 name on Windows (`RUNNER~1`), and the right-hand side is resolved, so the two spellings name one folder but compare unequal — the child fails its own assertion. The fixture used to check that the runner starts the artifact in its own folder, and that is still what it checks: resolving the working directory compares the folders. A child that started somewhere else still fails the assertion. (For the record, the `no Wine prefix at ... no-prefix: drive d: not mapped` line in the same output is the deliberate note from `MainTest.setUp` keeping the run away from `~/.wine`; it is not what failed.) ### Tested macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files: | tree | `tests/test_run_wine_tests.py` | |---|---| | `main@9ec34cdff` | `OK` (POSIX: the two spellings already match) | | this commit | `OK` | The Windows failure itself is the `check` job log quoted above (`9ec34cdff`, run 45306800350, job 138157329747); the resolved comparison is the same `tempfile` 8.3 shape fixed for other files in #69 and #75. Not run on Windows. `compileall` clean, `check_no_game_data.py` clean. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: test-only.)
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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:44:39 +00:00
github manually merged commit 1603c83aa7 into gh-pr/107/base 2026-11-26 08:44:41 +00:00
Author
Owner

@⁠wavehs on GitHub · 2026-11-24 02:29 UTC · original

Rebased onto main@e09a55529; the diff is unchanged and tests/test_run_wine_tests.py is still OK here.

**@⁠wavehs** on GitHub · 2026-11-24 02:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/107#issuecomment-7120195262) Rebased onto `main@e09a55529`; the diff is unchanged and `tests/test_run_wine_tests.py` is still OK here.
This discussion has been locked. Commenting is limited to contributors.
No description provided.