diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-08 23:16:47 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-08 23:16:47 (GMT) |
commit | f18d6f3f443bdfe3f349b2f49231a3c08a5b2d3f (patch) | |
tree | 9ae812916635e23b04bdb6d3522a056ea1c6f6a0 /Lib/test | |
parent | b0a9c66a49b6ced6748c33ecff407812facd723d (diff) | |
download | cpython-f18d6f3f443bdfe3f349b2f49231a3c08a5b2d3f.zip cpython-f18d6f3f443bdfe3f349b2f49231a3c08a5b2d3f.tar.gz cpython-f18d6f3f443bdfe3f349b2f49231a3c08a5b2d3f.tar.bz2 |
Fix flakiness in test_socketserver
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_socketserver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 0e76c33..353f8ff 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -34,8 +34,11 @@ def signal_alarm(n): if hasattr(signal, 'alarm'): signal.alarm(n) +# Remember real select() to avoid interferences with mocking +_real_select = select.select + def receive(sock, n, timeout=20): - r, w, x = select.select([sock], [], [], timeout) + r, w, x = _real_select([sock], [], [], timeout) if sock in r: return sock.recv(n) else: |