Skip to content

Commit cf0f4e6

Browse files
[3.13] gh-143528: Fix test_time.test_thread_time() (GH-143558) (#143560)
gh-143528: Fix test_time.test_thread_time() (GH-143558) Tolerate 100 ms instead of 20 ms to support slow CIs. (cherry picked from commit efaa56f) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 5af09f5 commit cf0f4e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_time.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,10 @@ def test_thread_time(self):
571571

572572
# thread_time() should not include time spend during a sleep
573573
start = time.thread_time()
574-
time.sleep(0.100)
574+
time.sleep(0.200)
575575
stop = time.thread_time()
576-
# use 20 ms because thread_time() has usually a resolution of 15 ms
577-
# on Windows
578-
self.assertLess(stop - start, 0.020)
576+
# gh-143528: use 100 ms to support slow CI
577+
self.assertLess(stop - start, 0.100)
579578

580579
info = time.get_clock_info('thread_time')
581580
self.assertTrue(info.monotonic)

0 commit comments

Comments
 (0)