summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_proactor_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-12 03:11:53 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-07-12 03:11:53 +0200
commite912e652f85bfd92d7209aa0cb23e5d3975a8d72 (patch)
tree9bd5327f26baf131749e46842ea038690914e369 /Lib/test/test_asyncio/test_proactor_events.py
parent8ebeb03740dad4d9edd65de88f82840a05070941 (diff)
downloadcpython-git-e912e652f85bfd92d7209aa0cb23e5d3975a8d72.tar.gz
asyncio: sync with Tulip
* Tulip issue #183: log socket events in debug mode - Log most important socket events: socket connected, new client, connection reset or closed by peer (EOF), etc. - Log time elapsed in DNS resolution (getaddrinfo) - Log pause/resume reading - Log time of SSL handshake - Log SSL handshake errors - Add a __repr__() method to many classes * Fix ProactorEventLoop() in debug mode. ProactorEventLoop._make_self_pipe() doesn't call call_soon() directly because it checks for the current loop which fails, because the method is called to build the event loop. * Cleanup _ProactorReadPipeTransport constructor. Not need to set again _read_fut attribute to None, it is already done in the base class.
Diffstat (limited to 'Lib/test/test_asyncio/test_proactor_events.py')
-rw-r--r--Lib/test/test_asyncio/test_proactor_events.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_proactor_events.py b/Lib/test/test_asyncio/test_proactor_events.py
index ddfceae14a..4bb4f0b369 100644
--- a/Lib/test/test_asyncio/test_proactor_events.py
+++ b/Lib/test/test_asyncio/test_proactor_events.py
@@ -358,16 +358,17 @@ class BaseProactorEventLoopTests(test_utils.TestCase):
self.loop = EventLoop(self.proactor)
self.set_event_loop(self.loop, cleanup=False)
- @mock.patch.object(BaseProactorEventLoop, 'call_soon')
+ @mock.patch.object(BaseProactorEventLoop, '_call_soon')
@mock.patch.object(BaseProactorEventLoop, '_socketpair')
- def test_ctor(self, socketpair, call_soon):
+ def test_ctor(self, socketpair, _call_soon):
ssock, csock = socketpair.return_value = (
mock.Mock(), mock.Mock())
loop = BaseProactorEventLoop(self.proactor)
self.assertIs(loop._ssock, ssock)
self.assertIs(loop._csock, csock)
self.assertEqual(loop._internal_fds, 1)
- call_soon.assert_called_with(loop._loop_self_reading)
+ _call_soon.assert_called_with(loop._loop_self_reading, (),
+ check_loop=False)
def test_close_self_pipe(self):
self.loop._close_self_pipe()