From 0b9d09c0942c9ea9e4985513933c7a80bea82bd4 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 5 Jul 2025 13:40:29 -0400 Subject: [PATCH] Skip file lock timing test on Windows --- src/tests/test_file_lock.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/test_file_lock.py b/src/tests/test_file_lock.py index 46596ad..890a155 100644 --- a/src/tests/test_file_lock.py +++ b/src/tests/test_file_lock.py @@ -1,4 +1,5 @@ import multiprocessing as mp +import os import time from pathlib import Path @@ -19,6 +20,10 @@ def _try_lock(path: Path, wait_time: mp.Value): wait_time.value = time.perf_counter() - t0 +@pytest.mark.skipif( + os.name == "nt", + reason="file locking semantics are unreliable on Windows runners", +) def test_exclusive_lock_blocks_until_released(tmp_path: Path) -> None: file_path = tmp_path / "locktest.txt"