[Python-checkins] python/dist/src/Lib/test test_urlparse.py,1.2.24.1,1.2.24.2
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Wed, 25 Sep 2002 12:22:12 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv12249/Lib/test
Modified Files:
Tag: release22-maint
test_urlparse.py
Log Message:
Backport:
Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton
Add a test too. urljoin() would make file:/tmp/foo instead of file:///tmp/foo
Index: test_urlparse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urlparse.py,v
retrieving revision 1.2.24.1
retrieving revision 1.2.24.2
diff -C2 -d -r1.2.24.1 -r1.2.24.2
*** test_urlparse.py 18 Mar 2002 13:03:40 -0000 1.2.24.1
--- test_urlparse.py 25 Sep 2002 19:22:10 -0000 1.2.24.2
***************
*** 13,16 ****
--- 13,18 ----
(RFC1808_BASE,
('http', 'a', '/b/c/d', 'p', 'q', 'f')),
+ ('file:///tmp/junk.txt',
+ ('file', '', '/tmp/junk.txt', '', '', '')),
]:
result = urlparse.urlparse(url)
***************
*** 21,24 ****
--- 23,29 ----
print ("expected %r,\n"
" got %r") % (expected, result)
+ # put it back together and it should be the same
+ result2 = urlparse.urlunparse(result)
+ assert(result2 == url)
print