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)