[Python-checkins] asyncio: Fix BaseSelectorEventLoopTests (#4595)

Victor Stinner webhook-mailer at python.org
Mon Nov 27 18:35:57 EST 2017


https://github.com/python/cpython/commit/92f9339a58a613a56683510499509d1b702921a8
commit: 92f9339a58a613a56683510499509d1b702921a8
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-11-28T00:35:55+01:00
summary:

asyncio: Fix BaseSelectorEventLoopTests (#4595)

Currently, two tests fail with PYTHONASYNCIODEBUG=1 (or using -X
dev).

files:
M Lib/test/test_asyncio/test_selector_events.py

diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index e67afcc7204..2adb43ae725 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -187,6 +187,7 @@ def test_sock_recv_reconnection(self):
         sock = mock.Mock()
         sock.fileno.return_value = 10
         sock.recv.side_effect = BlockingIOError
+        sock.gettimeout.return_value = 0.0
 
         self.loop.add_reader = mock.Mock()
         self.loop.remove_reader = mock.Mock()
@@ -267,6 +268,7 @@ def test_sock_sendall_reconnection(self):
         sock = mock.Mock()
         sock.fileno.return_value = 10
         sock.send.side_effect = BlockingIOError
+        sock.gettimeout.return_value = 0.0
 
         self.loop.add_writer = mock.Mock()
         self.loop.remove_writer = mock.Mock()



More information about the Python-checkins mailing list