From: Victor Stinner Date: Sun, 29 Apr 2012 22:51:31 +0000 (+0200) Subject: Issue #14428: Make test_process_time_threads() less strict X-Git-Tag: v3.3.0a3~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5df72c2c27b8a4ff05201eb613d30b50f69c7869;p=python Issue #14428: Make test_process_time_threads() less strict --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 85f8c526a8..435e0a45cb 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')