diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_socket.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 62c2e25..09e2cc8 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1008,18 +1008,13 @@ class NetworkConnectionAttributesTest(SocketTCPTest, ThreadableTest): self.cli = socket.create_connection((HOST, self.port), timeout=30) self.assertEqual(self.cli.family, 2) - testSourcePort = _justAccept - def _testSourcePort(self): + testSourceAddress = _justAccept + def _testSourceAddress(self): self.cli = socket.create_connection((HOST, self.port), timeout=30, source_address=('', self.source_port)) self.assertEqual(self.cli.getsockname()[1], self.source_port) - - testSourceAddress = _justAccept - def _testSourceAddress(self): - self.cli = socket.create_connection( - (HOST, self.port), 30, ('127.0.0.1', self.source_port)) - self.assertEqual(self.cli.getsockname(), - ('127.0.0.1', self.source_port)) + # The port number being used is sufficient to show that the bind() + # call happened. testTimeoutDefault = _justAccept def _testTimeoutDefault(self): |