[Python-checkins] r77286 - python/trunk/Lib/test/test_socket.py
gregory.p.smith
python-checkins at python.org
Sun Jan 3 16:05:53 CET 2010
Author: gregory.p.smith
Date: Sun Jan 3 16:05:52 2010
New Revision: 77286
Log:
Fix testSourceAddress to not test the host, it wasn't passing on some platforms.
Modified:
python/trunk/Lib/test/test_socket.py
Modified: python/trunk/Lib/test/test_socket.py
==============================================================================
--- python/trunk/Lib/test/test_socket.py (original)
+++ python/trunk/Lib/test/test_socket.py Sun Jan 3 16:05:52 2010
@@ -1010,18 +1010,13 @@
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):
More information about the Python-checkins
mailing list