diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-04-29 22:51:31 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-04-29 22:51:31 (GMT) |
commit | 5df72c2c27b8a4ff05201eb613d30b50f69c7869 (patch) | |
tree | a8b38c9931fc8fe5eb0a8ebf16018afe10810fa7 | |
parent | 934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3 (diff) | |
download | cpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.zip cpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.tar.gz cpython-5df72c2c27b8a4ff05201eb613d30b50f69c7869.tar.bz2 |
Issue #14428: Make test_process_time_threads() less strict
-rw-r--r-- | Lib/test/test_time.py | 3 |
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') |