(self)
| 7344 | class CreateServerTest(unittest.TestCase): |
| 7345 | |
| 7346 | def test_address(self): |
| 7347 | port = socket_helper.find_unused_port() |
| 7348 | with socket.create_server(("127.0.0.1", port)) as sock: |
| 7349 | self.assertEqual(sock.getsockname()[0], "127.0.0.1") |
| 7350 | self.assertEqual(sock.getsockname()[1], port) |
| 7351 | if socket_helper.IPV6_ENABLED: |
| 7352 | with socket.create_server(("::1", port), |
| 7353 | family=socket.AF_INET6) as sock: |
| 7354 | self.assertEqual(sock.getsockname()[0], "::1") |
| 7355 | self.assertEqual(sock.getsockname()[1], port) |
| 7356 | |
| 7357 | def test_family_and_type(self): |
| 7358 | with socket.create_server(("127.0.0.1", 0)) as sock: |
nothing calls this directly
no test coverage detected