This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bad test case in test_osx_proxy_bypass (test.test_urllib2.HandlerTests)
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Wenzhu.Man, python-dev, r.david.murray
Priority: normal Keywords: patch

Created on 2014-03-15 04:08 by Wenzhu.Man, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mypatch.patch Wenzhu.Man, 2014-03-15 05:03 review
Messages (4)
msg213633 - (view) Author: Wenzhu Man (Wenzhu.Man) Date: 2014-03-15 04:08
in test_urllib2.py file:

 test_osx_proxy_bypass (test.test_urllib2.HandlerTests)
# Check hosts that should not trigger the proxy bypass
 for host in ('abc.foo.bar', 'bar.com', '127.0.0.2', '10.11.0.1', 'test'):
        self.assertFalse(_proxy_bypass_macosx_sysconf(host, bypass),
                              'expected bypass of %s to be False' % host)

for host 'test' under some wifi conditions(University of Waterloo wifi)the socket.gethostbyname('test') returns localhost which is in the exceptions.

the assertion will fail.

this testcase should be modified or we add some condition before the assertion
msg213638 - (view) Author: Wenzhu Man (Wenzhu.Man) Date: 2014-03-15 05:03
modify the host 'test' name to a less general one 'testMacProxyBypass'

so it won't be DNS mapped to certain ip that happens to be in exceptions
msg213658 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-15 16:03
New changeset 6a78bbd0fda4 by R David Murray in branch '3.3':
#20933: At least one place maps 'test' to 'localhost'...fix test.
http://hg.python.org/cpython/rev/6a78bbd0fda4

New changeset 586de8d96817 by R David Murray in branch 'default':
Merge: #20933: At least one place maps 'test' to 'localhost'...fix test.
http://hg.python.org/cpython/rev/586de8d96817
msg213660 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-03-15 16:04
Fix looks good to me, thanks.  I changed the name to be a bit more descriptive, and wrapped the line to less than 80 characters.
History
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65132
2014-03-15 16:04:49r.david.murraysetstatus: open -> closed

type: behavior
versions: + Python 3.3
nosy: + r.david.murray

messages: + msg213660
stage: resolved
2014-03-15 16:03:25python-devsetnosy: + python-dev
messages: + msg213658
2014-03-15 05:03:27Wenzhu.Mansetfiles: + mypatch.patch
resolution: fixed
messages: + msg213638

keywords: + patch
2014-03-15 04:08:02Wenzhu.Mancreate