mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #14428: Make test_process_time_threads() less strict
This commit is contained in:
parent
934cb18ef5
commit
5df72c2c27
1 changed files with 2 additions and 1 deletions
|
@ -438,7 +438,8 @@ class TimeTestCase(unittest.TestCase):
|
|||
t2 = time.process_time()
|
||||
thread.stop = True
|
||||
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'),
|
||||
'need time.monotonic')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue