@@ -1784,7 +1784,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
17841784 reuse_address = False )
17851785
17861786 with self .assertWarns (DeprecationWarning ):
1787- self .loop .run_until_complete (coro )
1787+ transport , protocol = self .loop .run_until_complete (coro )
1788+ transport .close ()
1789+ self .loop .run_until_complete (protocol .done )
1790+ self .assertEqual ('CLOSED' , protocol .state )
17881791
17891792 @patch_socket
17901793 def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1794,7 +1797,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
17941797 coro = self .loop .create_datagram_endpoint (
17951798 lambda : MyDatagramProto (loop = self .loop ),
17961799 local_addr = ('127.0.0.1' , 0 ),
1797- reuse_address = False ,
17981800 reuse_port = True )
17991801
18001802 self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1813,7 +1815,6 @@ def getaddrinfo(*args, **kw):
18131815 coro = self .loop .create_datagram_endpoint (
18141816 lambda : MyDatagramProto (loop = self .loop ),
18151817 local_addr = ('1.2.3.4' , 0 ),
1816- reuse_address = False ,
18171818 reuse_port = reuseport_supported )
18181819
18191820 t , p = self .loop .run_until_complete (coro )
0 commit comments