Fix issue14826 - make urllib.request.Request quoted url consistent with URLOpener open method.
Patch contributed by Stephen Thorne.
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index c6f6f61..69d5438 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1246,6 +1246,11 @@
# ftp.close()
+ def test_quote_url(self):
+ Request = urllib.request.Request
+ request = Request("http://www.python.org/foo bar")
+ self.assertEqual(request.full_url, "http://www.python.org/foo%20bar")
+
def test_main():
support.run_unittest(