summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urlparse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index bf9e317684..fff8408d60 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -316,6 +316,11 @@ class UrlParseTestCase(unittest.TestCase):
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)