mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #1876] tests: import fcntl where it is used so test_run_game_wine loads on Windows (TEST-RUN-GAME-WINE-WINDOWS-IMPORT) #1886
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1886
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1876
Author: @fiestorra
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:carry/test-run-game-wine-windows-import📝 Commits (1)
7489dbeTEST-RUN-GAME-WINE-WINDOWS-IMPORT: import fcntl where it is used, so the file loads on Windows📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
tests/test_run_game_wine.py(+4 -1)📄 Description
Claimed in the coordination issue as: TEST-RUN-GAME-WINE-WINDOWS-IMPORT (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7164391310)
What and why
tests/test_run_game_wine.pycould not be imported on Windows:import fcntlsat at module level (line 14), and the file is one of the eight that thecheckjob'spython -Iloop onwindows-latestruns. The class already carries@unittest.skipIf(os.name == "nt" or not shutil.which("bash"), "a POSIX bash launcher"), but the skip cannot take effect when the import fails first, so the loop stopped on this file withModuleNotFoundError: No module named 'fcntl'.The change moves the import into the single test that uses it (
test_a_held_lock_stops_a_second_run, which locksself.lockwithfcntl.flock). That test is already gated by the class-level POSIX skip, so behaviour on Linux and macOS is unchanged. No test is disabled and no assertion is loosened.This does not turn the whole Windows job green on its own: the other seven files the loop fails are covered by #1792 (three tools' repr'd paths), #1561 (the dead
test_feature_scantest andcompute_heap_layout_census), #1837 and #1789 (stdout guards), and the standing claims TEST-WINE-JOBS-TIMING-WINDOWS and CI-RUNTIME-PATHS-CONFORMANCE.Tested
Windows 11, Windows Python 3.13.14,
maina73a57e1, native (no Wine, no GPU):python -I tests/test_run_game_wine.py-> exit 1,Traceback ... line 14, in <module> / import fcntl / ModuleNotFoundError: No module named 'fcntl'.python -I tests/test_run_game_wine.py->Ran 9 tests in 0.000s / OK (skipped=9), exit 0;-vlists the nine skips with the class's reason, so the file is discovered and skipped rather than silently absent.python -m compileall -q tests/test_run_game_wine.py-> exit 0.python3 -I tests/test_run_game_wine.py->Ran 9 tests in 0.340s / OK, no skips, so the POSIX path this change moves the import into still runs all nine tests.tests/test_runner_calls_all_tests.pystill reports only the pre-existingtest_feature_scan.pyentry (#1561), nothing about this file.check-no-game-data-> the tree is clean.Not covered: macOS. The two gate jobs (
change-scope,no-game-data) are queued, as the repository's queue has been for hours; nocheckhas started.GPUs tested: n/a
AI-assisted: yes (DeepSeek Harness).
Checklist
main(a73a57e1) and merges cleanly.docs/design.md, with how it was confirmed. (n/a: no translator change)Written with an AI assistant.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.