diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-27 22:31:58 +0000 |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-27 22:31:58 +0000 |
commit | 79a9106e18bb3ad38f2adb78da107e05f30ecdd4 (patch) | |
tree | d052fdf1e961bd40d6dff0d9e7d023b44c05ebd3 /Lib/test/test_urllib2.py | |
parent | cdeb45c485d375417c8a3c478ed107caa9f7352d (diff) | |
download | cpython-79a9106e18bb3ad38f2adb78da107e05f30ecdd4.tar.gz |
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/test/test_urllib2.py')
-rw-r--r-- | Lib/test/test_urllib2.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |