cpython: Issue #14428: Make test_process_time_threads() less strict
http://hg.python.org/cpython/rev/0bdf0727ee29 changeset: 76653:0bdf0727ee29 user: Victor Stinner <victor.stinner@gmail.com> date: Mon Apr 30 00:51:31 2012 +0200 summary: Issue #14428: Make test_process_time_threads() less strict files: 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 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -438,7 +438,8 @@ 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') -- Repository URL: http://hg.python.org/cpython
participants (1)
-
victor.stinner