summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-01-03 15:09:32 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-01-03 15:09:32 (GMT)
commita81d881e136021a84656620b3bf11dfa8b0556ec (patch)
treee197a14908a4909356dfc1b6c97d040615143b70
parent165985c73684b771c6c8e63ab65654ea4a85930f (diff)
downloadcpython-a81d881e136021a84656620b3bf11dfa8b0556ec.zip
cpython-a81d881e136021a84656620b3bf11dfa8b0556ec.tar.gz
cpython-a81d881e136021a84656620b3bf11dfa8b0556ec.tar.bz2
Merged revisions 77286 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77286 | gregory.p.smith | 2010-01-03 07:05:52 -0800 (Sun, 03 Jan 2010) | 2 lines Fix testSourceAddress to not test the host, it wasn't passing on some platforms. ........
-rw-r--r--Lib/test/test_socket.py13
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):