Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da94b9e

Browse files
committed
Issue #20311: add debug help in test_selectors
1 parent c520edc commit da94b9e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/test/test_selectors.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import signal
66
import socket
77
from test import support
8-
from time import sleep, perf_counter
8+
from time import sleep, perf_counter, get_clock_info
99
import unittest
1010
import unittest.mock
1111
try:
@@ -377,7 +377,10 @@ def test_timeout_rounding(self):
377377
t0 = perf_counter()
378378
s.select(timeout)
379379
dt = perf_counter() - t0
380-
self.assertGreaterEqual(dt, timeout)
380+
clock = get_clock_info('perf_counter')
381+
self.assertGreaterEqual(dt, timeout,
382+
"%.30f < %.30f ; clock=%s"
383+
% (dt, timeout, clock))
381384

382385

383386
class ScalableSelectorMixIn:

0 commit comments

Comments
 (0)