summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-12 06:08:48 -0800
committerƁukasz Langa <lukasz@langa.pl>2019-12-12 15:08:48 +0100
commitb35ec007b60bcf91f76ae3efc3e8cc1e032bfc66 (patch)
tree85129cb44b6622786d444e0ee58ed57bf2070ae1
parentbf62515a5ba9214c999c2feb54a958c3ec4d134f (diff)
downloadcpython-git-b35ec007b60bcf91f76ae3efc3e8cc1e032bfc66.tar.gz
Fix warnings in test_asyncio.test_base_events (GH-17577) (#17581)
Co-authored-by: tirkarthi (cherry picked from commit 1988344a6bff253f017e053f69318ecf03587294) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
-rw-r--r--Lib/test/test_asyncio/test_base_events.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 93e8903c2c..06f1f68294 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1708,7 +1708,10 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
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):
@@ -1718,7 +1721,6 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
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)
@@ -1737,7 +1739,6 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
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)