summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-27 22:31:58 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-27 22:31:58 (GMT)
commit535c52450865b961a9222518965b41dd950cca81 (patch)
tree84a89f05f515587c4b0320d3b3d713933ce24fe5 /Lib
parent80ea40d8585a0e8d67dcf1f1900e8dfe27510927 (diff)
downloadcpython-535c52450865b961a9222518965b41dd950cca81.zip
cpython-535c52450865b961a9222518965b41dd950cca81.tar.gz
cpython-535c52450865b961a9222518965b41dd950cca81.tar.bz2
A quick hack to make the test pass on the Mac (similar to the quick hack
to make it pass on Windows:-).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_urllib2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 80356f8..5b4c68c 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)