diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-28 10:15:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 10:15:26 (GMT) |
commit | a10dc3efcbba8aa7cc7d1a017f8b22fc4fa8e87c (patch) | |
tree | 6ed634f185e7920ed25ae56e537e0202b675f7c9 /Lib/test/test_asyncio/test_windows_events.py | |
parent | 92f9339a58a613a56683510499509d1b702921a8 (diff) | |
download | cpython-a10dc3efcbba8aa7cc7d1a017f8b22fc4fa8e87c.zip cpython-a10dc3efcbba8aa7cc7d1a017f8b22fc4fa8e87c.tar.gz cpython-a10dc3efcbba8aa7cc7d1a017f8b22fc4fa8e87c.tar.bz2 |
asyncio: use directly socket.socketpair() (#4597)
Since Python 3.5, socket.socketpair() is also available on Windows,
and so can be used directly, rather than using
asyncio.windows_utils.socketpair().
Diffstat (limited to 'Lib/test/test_asyncio/test_windows_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_windows_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py index c72eef1..b70c0b7 100644 --- a/Lib/test/test_asyncio/test_windows_events.py +++ b/Lib/test/test_asyncio/test_windows_events.py @@ -1,4 +1,5 @@ import os +import socket import sys import unittest from unittest import mock @@ -36,7 +37,7 @@ class ProactorTests(test_utils.TestCase): self.set_event_loop(self.loop) def test_close(self): - a, b = self.loop._socketpair() + a, b = socket.socketpair() trans = self.loop._make_socket_transport(a, asyncio.Protocol()) f = asyncio.ensure_future(self.loop.sock_recv(b, 100)) trans.close() |