@@ -1784,7 +1784,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
1784
1784
reuse_address = False )
1785
1785
1786
1786
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 )
1788
1791
1789
1792
@patch_socket
1790
1793
def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1794,7 +1797,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
1794
1797
coro = self .loop .create_datagram_endpoint (
1795
1798
lambda : MyDatagramProto (loop = self .loop ),
1796
1799
local_addr = ('127.0.0.1' , 0 ),
1797
- reuse_address = False ,
1798
1800
reuse_port = True )
1799
1801
1800
1802
self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1813,7 +1815,6 @@ def getaddrinfo(*args, **kw):
1813
1815
coro = self .loop .create_datagram_endpoint (
1814
1816
lambda : MyDatagramProto (loop = self .loop ),
1815
1817
local_addr = ('1.2.3.4' , 0 ),
1816
- reuse_address = False ,
1817
1818
reuse_port = reuseport_supported )
1818
1819
1819
1820
t , p = self .loop .run_until_complete (coro )
0 commit comments