[PR #107] [MERGED] tests: resolve both sides of the Wine runner's working-directory check #159

Closed
opened 2026-11-26 20:16:58 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/107
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: tests-win-wine-cwd-resolve


📝 Commits (1)

  • 1603c83 tests: resolve both sides of the Wine runner's working-directory check

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 tests/test_run_wine_tests.py (+3 -1)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/107 **Author:** [@wavehs](https://github.com/wavehs) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `tests-win-wine-cwd-resolve` --- ### 📝 Commits (1) - [`1603c83`](https://github.com/ubiquitarianism/leonida/commit/1603c83aa7956f6bf642d51dcc54ddfc59e893c2) tests: resolve both sides of the Wine runner's working-directory check ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_run_wine_tests.py` (+3 -1) </details> ### 📄 Description 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.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:16:58 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#159
No description provided.