@@ -1808,7 +1808,10 @@ def test_create_datagram_endpoint_reuse_address_warning(self):
1808
1808
reuse_address = False )
1809
1809
1810
1810
with self .assertWarns (DeprecationWarning ):
1811
- self .loop .run_until_complete (coro )
1811
+ transport , protocol = self .loop .run_until_complete (coro )
1812
+ transport .close ()
1813
+ self .loop .run_until_complete (protocol .done )
1814
+ self .assertEqual ('CLOSED' , protocol .state )
1812
1815
1813
1816
@patch_socket
1814
1817
def test_create_datagram_endpoint_nosoreuseport (self , m_socket ):
@@ -1818,7 +1821,6 @@ def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
1818
1821
coro = self .loop .create_datagram_endpoint (
1819
1822
lambda : MyDatagramProto (loop = self .loop ),
1820
1823
local_addr = ('127.0.0.1' , 0 ),
1821
- reuse_address = False ,
1822
1824
reuse_port = True )
1823
1825
1824
1826
self .assertRaises (ValueError , self .loop .run_until_complete , coro )
@@ -1837,7 +1839,6 @@ def getaddrinfo(*args, **kw):
1837
1839
coro = self .loop .create_datagram_endpoint (
1838
1840
lambda : MyDatagramProto (loop = self .loop ),
1839
1841
local_addr = ('1.2.3.4' , 0 ),
1840
- reuse_address = False ,
1841
1842
reuse_port = reuseport_supported )
1842
1843
1843
1844
t , p = self .loop .run_until_complete (coro )
0 commit comments