[Python-checkins] r59760 - python/branches/release25-maint/Lib/test/test_urlparse.py
guido.van.rossum
python-checkins at python.org
Sun Jan 6 00:34:38 CET 2008
Author: guido.van.rossum
Date: Sun Jan 6 00:34:38 2008
New Revision: 59760
Modified:
python/branches/release25-maint/Lib/test/test_urlparse.py
Log:
Backport r59758.
Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
Fix by John Nagle.
Modified: python/branches/release25-maint/Lib/test/test_urlparse.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_urlparse.py (original)
+++ python/branches/release25-maint/Lib/test/test_urlparse.py Sun Jan 6 00:34:38 2008
@@ -298,6 +298,11 @@
self.assertEqual(type(p.hostname), type(uri))
self.assertEqual(type(p.path), type(uri))
+ def test_noslash(self):
+ # Issue 1637: http://foo.com?query is legal
+ self.assertEqual(urlparse.urlparse("http://example.com?blahblah=/foo"),
+ ('http', 'example.com', '', '', 'blahblah=/foo', ''))
+
def test_main():
test_support.run_unittest(UrlParseTestCase)
More information about the Python-checkins
mailing list