summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-04-29 22:51:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-04-29 22:51:31 (GMT)
commit5df72c2c27b8a4ff05201eb613d30b50f69c7869 (patch)
treea8b38c9931fc8fe5eb0a8ebf16018afe10810fa7 /Lib/test/test_time.py
parent934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3 (diff)
downloadcpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.zip
cpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.tar.gz
cpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.tar.bz2
Issue #14428: Make test_process_time_threads() less strict
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 85f8c52..435e0a4 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -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')