[Python-checkins] (no subject)

Łukasz Langa webhook-mailer at python.org
Thu Dec 12 08:48:42 EST 2019




To: python-checkins at python.org
Subject: Fix warnings in test_asyncio.test_base_events (#17577)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

https://github.com/python/cpython/commit/1988344a6bff253f017e053f69318ecf0358=
7294
commit: 1988344a6bff253f017e053f69318ecf03587294
branch: master
author: Kyle Stanley <aeros167 at gmail.com>
committer: =C5=81ukasz Langa <lukasz at langa.pl>
date: 2019-12-12T14:48:20+01:00
summary:

Fix warnings in test_asyncio.test_base_events (#17577)

Co-authored-by: tirkarthi

files:
M Lib/test/test_asyncio/test_base_events.py

diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asynci=
o/test_base_events.py
index 6c0f00dc93647..fc832d3467131 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1814,7 +1814,10 @@ def test_create_datagram_endpoint_reuse_address_warnin=
g(self):
             reuse_address=3DFalse)
=20
         with self.assertWarns(DeprecationWarning):
-            self.loop.run_until_complete(coro)
+            transport, protocol =3D self.loop.run_until_complete(coro)
+            transport.close()
+            self.loop.run_until_complete(protocol.done)
+            self.assertEqual('CLOSED', protocol.state)
=20
     @patch_socket
     def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
@@ -1824,7 +1827,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m=
_socket):
         coro =3D self.loop.create_datagram_endpoint(
             lambda: MyDatagramProto(loop=3Dself.loop),
             local_addr=3D('127.0.0.1', 0),
-            reuse_address=3DFalse,
             reuse_port=3DTrue)
=20
         self.assertRaises(ValueError, self.loop.run_until_complete, coro)
@@ -1843,7 +1845,6 @@ def getaddrinfo(*args, **kw):
         coro =3D self.loop.create_datagram_endpoint(
             lambda: MyDatagramProto(loop=3Dself.loop),
             local_addr=3D('1.2.3.4', 0),
-            reuse_address=3DFalse,
             reuse_port=3Dreuseport_supported)
=20
         t, p =3D self.loop.run_until_complete(coro)



More information about the Python-checkins mailing list