Zsolt Cserna <zsolt.cse...@morganstanley.com> added the comment:

The test which failed was HandlerTests.test_file, and I'm using python 2.7.1.

socket.gethostbyname('localhost') returns "127.0.0.1" which is ok, but in the 
unittest it's already tested (line 671).

The problem is that my /etc/hosts file contains a different IP than the DNS (I 
cannot change this behaviour as I'm not the administrator of the host) and 
that's the difference between gethostbyname and gethostbyname_ex.

The unittest creates an url which is not local (from urllib2 point of view). 
I'm attaching a patch which has fixed my problem.

----------
keywords: +patch
Added file: http://bugs.python.org/file20050/test_urllib2.py.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5625>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to