@@ -1708,7 +1708,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
1708
1708
reuse_address = False )
1709
1709
1710
1710
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 )
1712
1715
1713
1716
@patch_socket
1714
1717
def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1718,7 +1721,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
1718
1721
coro = self .loop .create_datagram_endpoint (
1719
1722
lambda : MyDatagramProto (loop = self .loop ),
1720
1723
local_addr = ('127.0.0.1' , 0 ),
1721
- reuse_address = False ,
1722
1724
reuse_port = True )
1723
1725
1724
1726
self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1737,7 +1739,6 @@ def getaddrinfo(*args, **kw):
1737
1739
coro = self .loop .create_datagram_endpoint (
1738
1740
lambda : MyDatagramProto (loop = self .loop ),
1739
1741
local_addr = ('1.2.3.4' , 0 ),
1740
- reuse_address = False ,
1741
1742
reuse_port = reuseport_supported )
1742
1743
1743
1744
t , p = self .loop .run_until_complete (coro )
0 commit comments