diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-15 19:46:40 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-15 19:46:40 (GMT) |
commit | 01683d86f241a591bfd18cb130a98323fc2d4055 (patch) | |
tree | a0db7a5e1f84541d5ffc6db0bfc17b1822541959 /Lib/test | |
parent | 965675e1e5809dfae0dad638f4af8d197d49178e (diff) | |
parent | 1b984ffd44f036cf5c0ce1933c0fb9ba6e94948a (diff) | |
download | cpython-01683d86f241a591bfd18cb130a98323fc2d4055.zip cpython-01683d86f241a591bfd18cb130a98323fc2d4055.tar.gz cpython-01683d86f241a591bfd18cb130a98323fc2d4055.tar.bz2 |
Merge 3.6 (issue #28174)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index 0efdc20..43ebdc8 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -1371,6 +1371,17 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): self.assertRaises(ValueError, self.loop.run_until_complete, f) @patch_socket + def test_create_server_soreuseport_only_defined(self, m_socket): + m_socket.getaddrinfo = socket.getaddrinfo + m_socket.socket.return_value = mock.Mock() + m_socket.SO_REUSEPORT = -1 + + f = self.loop.create_server( + MyProto, '0.0.0.0', 0, reuse_port=True) + + self.assertRaises(ValueError, self.loop.run_until_complete, f) + + @patch_socket def test_create_server_cant_bind(self, m_socket): class Err(OSError): |