@@ -1708,7 +1708,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
17081708 reuse_address = False )
17091709
17101710 with self .assertWarns (DeprecationWarning ):
1711- self .loop .run_until_complete (coro )
1711+ transport , protocol = self .loop .run_until_complete (coro )
1712+ transport .close ()
1713+ self .loop .run_until_complete (protocol .done )
1714+ self .assertEqual ('CLOSED' , protocol .state )
17121715
17131716 @patch_socket
17141717 def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1718,7 +1721,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
17181721 coro = self .loop .create_datagram_endpoint (
17191722 lambda : MyDatagramProto (loop = self .loop ),
17201723 local_addr = ('127.0.0.1' , 0 ),
1721- reuse_address = False ,
17221724 reuse_port = True )
17231725
17241726 self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1737,7 +1739,6 @@ def getaddrinfo(*args, **kw):
17371739 coro = self .loop .create_datagram_endpoint (
17381740 lambda : MyDatagramProto (loop = self .loop ),
17391741 local_addr = ('1.2.3.4' , 0 ),
1740- reuse_address = False ,
17411742 reuse_port = reuseport_supported )
17421743
17431744 t , p = self .loop .run_until_complete (coro )
0 commit comments