]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-143528: Fix test_time.test_thread_time() (#143558)
authorVictor Stinner <vstinner@python.org>
Thu, 8 Jan 2026 13:05:57 +0000 (14:05 +0100)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 13:05:57 +0000 (14:05 +0100)
Tolerate 100 ms instead of 20 ms to support slow CIs.

Lib/test/test_time.py

index c7e81fff6f776b48971779287f1a71079dfa065d..715aaf384a309cce8d564162575172e232fb26f5 100644 (file)
@@ -580,11 +580,10 @@ class TimeTestCase(unittest.TestCase):
 
         # thread_time() should not include time spend during a sleep
         start = time.thread_time()
-        time.sleep(0.100)
+        time.sleep(0.200)
         stop = time.thread_time()
-        # use 20 ms because thread_time() has usually a resolution of 15 ms
-        # on Windows
-        self.assertLess(stop - start, 0.020)
+        # gh-143528: use 100 ms to support slow CI
+        self.assertLess(stop - start, 0.100)
 
         info = time.get_clock_info('thread_time')
         self.assertTrue(info.monotonic)