summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_base_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_base_events.py')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index adc7bd42c1..b522fac23a 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1794,32 +1794,6 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self.loop.run_until_complete(protocol.done)
self.assertEqual('CLOSED', protocol.state)
- def test_create_datagram_endpoint_reuse_address_error(self):
- # bpo-37228: Ensure that explicit passing of `reuse_address=True`
- # raises an error, as it is not safe to use SO_REUSEADDR when using UDP
-
- coro = self.loop.create_datagram_endpoint(
- lambda: MyDatagramProto(create_future=True, loop=self.loop),
- local_addr=('127.0.0.1', 0),
- reuse_address=True)
-
- with self.assertRaises(ValueError):
- self.loop.run_until_complete(coro)
-
- def test_create_datagram_endpoint_reuse_address_warning(self):
- # bpo-37228: Deprecate *reuse_address* parameter
-
- coro = self.loop.create_datagram_endpoint(
- lambda: MyDatagramProto(create_future=True, loop=self.loop),
- local_addr=('127.0.0.1', 0),
- reuse_address=False)
-
- with self.assertWarns(DeprecationWarning):
- transport, protocol = self.loop.run_until_complete(coro)
- transport.close()
- self.loop.run_until_complete(protocol.done)
- self.assertEqual('CLOSED', protocol.state)
-
@patch_socket
def test_create_datagram_endpoint_nosoreuseport(self, m_socket):
del m_socket.SO_REUSEPORT