From f5aee27794e30fc9d836d5313e33b014b1226612 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 29 Jun 2025 20:56:06 -0400 Subject: [PATCH] Increase tolerance for lock timing --- src/tests/test_file_lock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/test_file_lock.py b/src/tests/test_file_lock.py index 7d9f2d2..6b0d3a8 100644 --- a/src/tests/test_file_lock.py +++ b/src/tests/test_file_lock.py @@ -37,4 +37,7 @@ def test_exclusive_lock_blocks_until_released(tmp_path: Path): p2.join() # CI runners can be jittery; allow generous slack around the 1s lock hold time - assert wait_time.value == pytest.approx(1.0, abs=0.4) + # Different operating systems spawn processes at slightly different speeds + # which can shift the measured wait time by a few hundred milliseconds. A + # wider tolerance keeps the test stable across platforms. + assert wait_time.value == pytest.approx(1.0, abs=0.5)