From: Jack Jansen Date: Mon, 27 Aug 2001 22:31:58 +0000 (+0000) Subject: A quick hack to make the test pass on the Mac (similar to the quick hack X-Git-Tag: v2.2a3~292 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535c52450865b961a9222518965b41dd950cca81;p=python A quick hack to make the test pass on the Mac (similar to the quick hack to make it pass on Windows:-). --- diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 80356f84d7..5b4c68c296 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -15,6 +15,10 @@ else: fname = os.path.abspath(urllib2.__file__).replace('\\', '/') if fname[1:2] == ":": fname = fname[2:] +# And more hacking to get it to work on MacOS. This assumes +# urllib.pathname2url works, unfortunately... +if os.name == 'mac': + fname = '/' + fname.replace(':', '/') file_url = "file://%s" % fname f = urllib2.urlopen(file_url)