diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-12-16 20:12:28 -0800 |
---|---|---|
committer | Ned Deily <nad@python.org> | 2019-12-18 13:39:14 -0500 |
commit | 9346209be4ef53bde3d0c16d72e9abc7bd0262de (patch) | |
tree | 2463024d8b4361c190d303ba7b9666a848b2e555 | |
parent | 3413f5cab084ae9f44ed6bfd2e02a08a751eb525 (diff) | |
download | cpython-git-9346209be4ef53bde3d0c16d72e9abc7bd0262de.tar.gz |
Fix warnings in test_asyncio.test_base_events (GH-17577) (GH-17580)
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.py | 7 |
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 2a4723a333..5025d260d4 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -1784,7 +1784,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): @@ -1794,7 +1797,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) @@ -1813,7 +1815,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) |