[Python-checkins] CVS: python/dist/src/Lib/test test_urllib2.py,1.3,1.4
Jack Jansen
jackjansen@users.sourceforge.net
Mon, 27 Aug 2001 15:32:00 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv19180/Python/Lib/test
Modified Files:
test_urllib2.py
Log Message:
A quick hack to make the test pass on the Mac (similar to the quick hack
to make it pass on Windows:-).
Index: test_urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib2.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_urllib2.py 2001/07/16 20:49:49 1.3
--- test_urllib2.py 2001/08/27 22:31:58 1.4
***************
*** 16,19 ****
--- 16,23 ----
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)