diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-01-23 14:07:26 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-01-23 14:07:26 (GMT) |
commit | da94b9ebeb02bfe51c48a9a979284016548ffb34 (patch) | |
tree | 08e4bbcb715d5fb11cc97d3178da3fb3306471d1 /Lib | |
parent | c520edc08b89c7e233dd8f7cf37cf5179268167f (diff) | |
download | cpython-da94b9ebeb02bfe51c48a9a979284016548ffb34.zip cpython-da94b9ebeb02bfe51c48a9a979284016548ffb34.tar.gz cpython-da94b9ebeb02bfe51c48a9a979284016548ffb34.tar.bz2 |
Issue #20311: add debug help in test_selectors
Diffstat (limited to 'Lib')
-rw-r--r-- | 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 index d306aef..130e0a8 100644 --- a/Lib/test/test_selectors.py +++ b/Lib/test/test_selectors.py @@ -5,7 +5,7 @@ import selectors 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 @@ class BaseSelectorTestCase(unittest.TestCase): 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: |