Commit ec64b9ff authored by Victor Stinner's avatar Victor Stinner

Issue #14428: Make test_process_time_threads() less strict

parent cb3980fe
...@@ -438,7 +438,8 @@ class TimeTestCase(unittest.TestCase): ...@@ -438,7 +438,8 @@ class TimeTestCase(unittest.TestCase):
t2 = time.process_time() t2 = time.process_time()
thread.stop = True thread.stop = True
thread.join() thread.join()
self.assertGreaterEqual(t2 - t1, busy) # Use a factor of 0.75 because time.process_time() is maybe not precise
self.assertGreaterEqual(t2 - t1, busy * 0.75)
@unittest.skipUnless(hasattr(time, 'monotonic'), @unittest.skipUnless(hasattr(time, 'monotonic'),
'need time.monotonic') 'need time.monotonic')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment