From: R David Murray Date: Sat, 15 Mar 2014 16:00:14 +0000 (-0400) Subject: #20933: At least one place maps 'test' to 'localhost'...fix test. X-Git-Tag: v3.4.1rc1~233^2~13^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdbe918eb0c0b1c3b812ccdfa49c7bd7d44099b7;p=thirdparty%2FPython%2Fcpython.git #20933: At least one place maps 'test' to 'localhost'...fix test. Discovery and patch by Wenzhu Man. University of Waterloo apparently maps the local name 'test' to localhost, which is in the bypass list, causing the test to fail. So change 'test' to a name unlikely to get mapped to localhost. --- diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 3559b1b7898c..d0691398b5be 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1209,7 +1209,8 @@ class HandlerTests(unittest.TestCase): self.assertTrue(_proxy_bypass_macosx_sysconf(host, bypass), 'expected bypass of %s to be True' % host) # 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'): + for host in ('abc.foo.bar', 'bar.com', '127.0.0.2', '10.11.0.1', + 'notinbypass'): self.assertFalse(_proxy_bypass_macosx_sysconf(host, bypass), 'expected bypass of %s to be False' % host)