[New-bugs-announce] [issue22753] urllib2 localnet Changed test to lookup IP-address of localhost

Håkan Lövdahl report at bugs.python.org
Tue Oct 28 15:47:08 CET 2014


New submission from Håkan Lövdahl:

Running this test gave me an error: 
./python -m test -v test_urllib2_localnet

======================================================================
ERROR: test_proxy_qop_auth_works (test.test_urllib2_localnet.ProxyAuthTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hakan/kod/cpython/cpython/Lib/urllib/request.py", line 1182, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 1154, in request
    self._send_request(method, url, body, headers)
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 1192, in _send_request
    self.endheaders(body)
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 1150, in endheaders
    self._send_output(message_body)
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 988, in _send_output
    self.send(msg)
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 923, in send
    self.connect()
  File "/home/hakan/kod/cpython/cpython/Lib/http/client.py", line 900, in connect
    self.timeout, self.source_address)
  File "/home/hakan/kod/cpython/cpython/Lib/socket.py", line 710, in create_connection
    raise err
  File "/home/hakan/kod/cpython/cpython/Lib/socket.py", line 701, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Changing "localhost" to "127.0.0.1" made the test pass. My friend puppet made a patch for it so it looks up the IP-address.

----------
components: Tests
messages: 230156
nosy: hakan
priority: normal
severity: normal
status: open
title: urllib2 localnet Changed test to lookup IP-address of localhost
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22753>
_______________________________________


More information about the New-bugs-announce mailing list