Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Lib/test/test_asyncio/test_base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
reuse_address=False)

with self.assertWarns(DeprecationWarning):
self.loop.run_until_complete(coro)
transport, protocol = self.loop.run_until_complete(coro)
transport.close()
self.loop.run_until_complete(protocol.done)
self.assertEqual('CLOSED', protocol.state)

@patch_socket
def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
Expand All @@ -1824,7 +1827,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
coro = self.loop.create_datagram_endpoint(
lambda: MyDatagramProto(loop=self.loop),
local_addr=('127.0.0.1', 0),
reuse_address=False,
reuse_port=True)

self.assertRaises(ValueError, self.loop.run_until_complete, coro)
Expand All @@ -1843,7 +1845,6 @@ def getaddrinfo(*args, **kw):
coro = self.loop.create_datagram_endpoint(
lambda: MyDatagramProto(loop=self.loop),
local_addr=('1.2.3.4', 0),
reuse_address=False,
reuse_port=reuseport_supported)

t, p = self.loop.run_until_complete(coro)
Expand Down