From 5df72c2c27b8a4ff05201eb613d30b50f69c7869 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 30 Apr 2012 00:51:31 +0200 Subject: Issue #14428: Make test_process_time_threads() less strict --- Lib/test/test_time.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- cgit v0.12