@@ -1814,7 +1814,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
1814
1814
reuse_address = False )
1815
1815
1816
1816
with self .assertWarns (DeprecationWarning ):
1817
- self .loop .run_until_complete (coro )
1817
+ transport , protocol = self .loop .run_until_complete (coro )
1818
+ transport .close ()
1819
+ self .loop .run_until_complete (protocol .done )
1820
+ self .assertEqual ('CLOSED' , protocol .state )
1818
1821
1819
1822
@patch_socket
1820
1823
def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1824,7 +1827,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
1824
1827
coro = self .loop .create_datagram_endpoint (
1825
1828
lambda : MyDatagramProto (loop = self .loop ),
1826
1829
local_addr = ('127.0.0.1' , 0 ),
1827
- reuse_address = False ,
1828
1830
reuse_port = True )
1829
1831
1830
1832
self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1843,7 +1845,6 @@ def getaddrinfo(*args, **kw):
1843
1845
coro = self .loop .create_datagram_endpoint (
1844
1846
lambda : MyDatagramProto (loop = self .loop ),
1845
1847
local_addr = ('1.2.3.4' , 0 ),
1846
- reuse_address = False ,
1847
1848
reuse_port = reuseport_supported )
1848
1849
1849
1850
t , p = self .loop .run_until_complete (coro )
0 commit comments