[Python-checkins] cpython: Issue #20311: add debug help in test_selectors
victor.stinner
python-checkins at python.org
Thu Jan 23 15:07:36 CET 2014
http://hg.python.org/cpython/rev/3637ccf9516a
changeset: 88654:3637ccf9516a
parent: 88652:8fe59931b64d
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Jan 23 15:07:26 2014 +0100
summary:
Issue #20311: add debug help in test_selectors
files:
Lib/test/test_selectors.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -5,7 +5,7 @@
import signal
import socket
from test import support
-from time import sleep, perf_counter
+from time import sleep, perf_counter, get_clock_info
import unittest
import unittest.mock
try:
@@ -377,7 +377,10 @@
t0 = perf_counter()
s.select(timeout)
dt = perf_counter() - t0
- self.assertGreaterEqual(dt, timeout)
+ clock = get_clock_info('perf_counter')
+ self.assertGreaterEqual(dt, timeout,
+ "%.30f < %.30f ; clock=%s"
+ % (dt, timeout, clock))
class ScalableSelectorMixIn:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list