Skip to content

Commit 07af2f8

Browse files
authored
Merge pull request python-trio#1086 from epellis/increase-sleep-time-leniency
[Sleep-time-leniency] Increase threshold to 50%
2 parents b2b09e1 + f970065 commit 07af2f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trio/tests/test_timeouts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async def check_takes_about(f, expected_dur):
1313
result = await outcome.acapture(f)
1414
dur = time.perf_counter() - start
1515
print(dur / expected_dur)
16-
# 1.2 is an arbitrary fudge factor because there's always some delay
16+
# 1.5 is an arbitrary fudge factor because there's always some delay
1717
# between when we become eligible to wake up and when we actually do. We
1818
# used to sleep for 0.05, and regularly observed overruns of 1.6x on
1919
# Appveyor, and then started seeing overruns of 2.3x on Travis's macOS, so
@@ -32,7 +32,7 @@ async def check_takes_about(f, expected_dur):
3232
# lol floating point we got slightly different rounding errors. (That
3333
# value above is exactly 128 ULPs below 1.0, which would make sense if it
3434
# started as a 1 ULP error at a different dynamic range.)
35-
assert (1 - 1e-8) <= (dur / expected_dur) < 1.2
35+
assert (1 - 1e-8) <= (dur / expected_dur) < 1.5
3636
return result.unwrap()
3737

3838

0 commit comments

Comments
 (0)