mirror of
https://github.com/python/cpython.git
synced 2026-03-27 15:10:56 +00:00
Fix testSourceAddress to not test the host, it wasn't passing on some platforms.
This commit is contained in:
parent
3b18ff7e8b
commit
49d709c921
1 changed files with 4 additions and 9 deletions
|
|
@ -1010,18 +1010,13 @@ def _testFamily(self):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue