Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/test_run_game_wine.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
extra gta6rt arguments passed. PATH holds only the stubs and the few real commands the script uses, so the machine's
own Wine and KWin are never started. POSIX only; no game files.
"""
import fcntl
import os
import shutil
import subprocess
Expand Down Expand Up @@ -151,6 +150,10 @@ def test_visible_needs_a_display(self):
self.assertIn("--visible needs DISPLAY", p.stderr)

def test_a_held_lock_stops_a_second_run(self):
# POSIX only, like the launcher: the class-level skip above keeps this off Windows, where `fcntl` does not exist
# and a module-level import of it made the file fail to load before the skip could run.
import fcntl

with open(self.lock, "w", encoding="utf-8", newline="\n") as held:
fcntl.flock(held, fcntl.LOCK_EX)
p = self.run_script(*self.inputs(), "--visible")
Expand Down
Loading