diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-09 20:47:47 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-09 20:47:47 (GMT) |
commit | 954c7dd0ccbe01668856d6a9816aeb1fe07bce7e (patch) | |
tree | 16bbc28ba590cf3d68c21406349e2b2cf431c002 /Lib/test/test_asyncio/test_events.py | |
parent | 6c1065061770e843f55be0506489c931a2cb7e96 (diff) | |
parent | a1a8b7d3d7f628aec31be364c77cbb3e21cdbc0b (diff) | |
download | cpython-954c7dd0ccbe01668856d6a9816aeb1fe07bce7e.zip cpython-954c7dd0ccbe01668856d6a9816aeb1fe07bce7e.tar.gz cpython-954c7dd0ccbe01668856d6a9816aeb1fe07bce7e.tar.bz2 |
Merge 3.5 (issue #28652)
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 5b32332..28d92a9 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -791,9 +791,9 @@ class EventLoopTestsMixin: conn, _ = lsock.accept() proto = MyProto(loop=loop) proto.loop = loop - f = loop.create_task( + loop.run_until_complete( loop.connect_accepted_socket( - (lambda : proto), conn, ssl=server_ssl)) + (lambda: proto), conn, ssl=server_ssl)) loop.run_forever() proto.transport.close() lsock.close() @@ -1377,6 +1377,11 @@ class EventLoopTestsMixin: server.transport.close() def test_create_datagram_endpoint_sock(self): + if (sys.platform == 'win32' and + isinstance(self.loop, proactor_events.BaseProactorEventLoop)): + raise unittest.SkipTest( + 'UDP is not supported with proactor event loops') + sock = None local_address = ('127.0.0.1', 0) infos = self.loop.run_until_complete( @@ -1394,7 +1399,7 @@ class EventLoopTestsMixin: else: assert False, 'Can not create socket.' - f = self.loop.create_connection( + f = self.loop.create_datagram_endpoint( lambda: MyDatagramProto(loop=self.loop), sock=sock) tr, pr = self.loop.run_until_complete(f) self.assertIsInstance(tr, asyncio.Transport) |