(self)
| 7254 | class CreateServerTest(unittest.TestCase): |
| 7255 | |
| 7256 | def test_address(self): |
| 7257 | port = socket_helper.find_unused_port() |
| 7258 | with socket.create_server(("127.0.0.1", port)) as sock: |
| 7259 | self.assertEqual(sock.getsockname()[0], "127.0.0.1") |
| 7260 | self.assertEqual(sock.getsockname()[1], port) |
| 7261 | if socket_helper.IPV6_ENABLED: |
| 7262 | with socket.create_server(("::1", port), |
| 7263 | family=socket.AF_INET6) as sock: |
| 7264 | self.assertEqual(sock.getsockname()[0], "::1") |
| 7265 | self.assertEqual(sock.getsockname()[1], port) |
| 7266 | |
| 7267 | def test_family_and_type(self): |
| 7268 | with socket.create_server(("127.0.0.1", 0)) as sock: |
nothing calls this directly
no test coverage detected