[Python-checkins] cpython: Issue #14428: Make test_process_time_threads() less strict
victor.stinner
python-checkins at python.org
Mon Apr 30 00:53:57 CEST 2012
http://hg.python.org/cpython/rev/0bdf0727ee29
changeset: 76653:0bdf0727ee29
user: Victor Stinner <victor.stinner at 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
More information about the Python-checkins
mailing list