[New-bugs-announce] [issue11958] test.test_ftplib.TestIPv6Environment failure
Charles-Francois Natali
report at bugs.python.org
Fri Apr 29 23:08:01 CEST 2011
New submission from Charles-Francois Natali <neologix at free.fr>:
test_ftplib fails in TestIPv6Environment:
======================================================================
ERROR: test_makepasv (test.test_ftplib.TestIPv6Environment)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cf/cpython/Lib/test/test_ftplib.py", line 651, in setUp
self.server = DummyFTPServer((HOST, 0), af=socket.AF_INET6)
File "/home/cf/cpython/Lib/test/test_ftplib.py", line 220, in __init__
self.bind(address)
File "/home/cf/cpython/Lib/asyncore.py", line 339, in bind
return self.socket.bind(addr)
socket.gaierror: [Errno -2] Name or service not known
======================================================================
ERROR: test_transfer (test.test_ftplib.TestIPv6Environment)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cf/cpython/Lib/test/test_ftplib.py", line 651, in setUp
self.server = DummyFTPServer((HOST, 0), af=socket.AF_INET6)
File "/home/cf/cpython/Lib/test/test_ftplib.py", line 220, in __init__
self.bind(address)
File "/home/cf/cpython/Lib/asyncore.py", line 339, in bind
return self.socket.bind(addr)
socket.gaierror: [Errno -2] Name or service not known
----------------------------------------------------------------------
Ran 74 tests in 6.595s
FAILED (errors=2)
test test_ftplib failed -- multiple errors occurred
1 test failed:
test_ftplib
The reason is that support.HOST is 'localhost'. and on most machines, localhost is an alias for 127.0.0.1, and not the IPv6 loopback, so the address resolution fails.
One possible solution is simply to pass ::1 (IPv6 loopback address) instead of support.HOST.
Patch attached.
----------
components: Tests
files: test_ftplib_ipv6.diff
keywords: patch
messages: 134811
nosy: giampaolo.rodola, neologix
priority: normal
severity: normal
status: open
title: test.test_ftplib.TestIPv6Environment failure
type: behavior
Added file: http://bugs.python.org/file21837/test_ftplib_ipv6.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11958>
_______________________________________
More information about the New-bugs-announce
mailing list