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

Victor Stinner webhook-mailer at python.org
Tue Nov 28 04:32:56 EST 2017


https://github.com/python/cpython/commit/4237939805099eb6eb875e4531820fa965319589
commit: 4237939805099eb6eb875e4531820fa965319589
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Victor Stinner <victor.stinner at gmail.com>
date: 2017-11-28T10:32:53+01:00
summary:

asyncio: Fix BaseSelectorEventLoopTests (GH-4595) (#4599)

Currently, two tests fail with PYTHONASYNCIODEBUG=1 (or using -X
dev).
(cherry picked from commit 92f9339a58a613a56683510499509d1b702921a8)

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 a3d118e1881..3477573ec3e 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -188,6 +188,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()
@@ -268,6 +269,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