summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urlparse.py
diff options
context:
space:
mode:
authorFacundo Batista <facundobatista@gmail.com>2008-08-14 16:55:14 (GMT)
committerFacundo Batista <facundobatista@gmail.com>2008-08-14 16:55:14 (GMT)
commit23e3856b1e275aaff210723d4bbafbdd61cd8e75 (patch)
treeb1580a6b163d8cb55b9e215c137db146069ad04a /Lib/test/test_urlparse.py
parent7b9cb2579c7edf49e4042bfb678ae2dc646d78ef (diff)
downloadcpython-23e3856b1e275aaff210723d4bbafbdd61cd8e75.zip
cpython-23e3856b1e275aaff210723d4bbafbdd61cd8e75.tar.gz
cpython-23e3856b1e275aaff210723d4bbafbdd61cd8e75.tar.bz2
Issue 1432. Fixes a bug caused because of the evolution
of the RFC that describes the behaviour. Note that we now have the same behaviour than the current browsers.
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r--Lib/test/test_urlparse.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index dbb7c36..103f89d 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -6,6 +6,7 @@ import urllib.parse
RFC1808_BASE = "http://a/b/c/d;p?q#f"
RFC2396_BASE = "http://a/b/c/d;p?q"
+RFC3986_BASE = "http://a/b/c/d;p?q"
class UrlParseTestCase(unittest.TestCase):
@@ -167,8 +168,6 @@ class UrlParseTestCase(unittest.TestCase):
def test_RFC2396(self):
# cases from RFC 2396
- self.checkJoin(RFC2396_BASE, '?y', 'http://a/b/c/?y')
- self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x')
self.checkJoin(RFC2396_BASE, 'g:h', 'g:h')
self.checkJoin(RFC2396_BASE, 'g', 'http://a/b/c/g')
@@ -210,6 +209,14 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin(RFC2396_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x')
self.checkJoin(RFC2396_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x')
+ #The following scenarios have been updated in RFC3986
+ #self.checkJoin(RFC2396_BASE, '?y', 'http://a/b/c/?y')
+ #self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x')
+
+ def test_RFC3986(self):
+ self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y')
+ self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x')
+
def test_urldefrag(self):
for url, defrag, frag in [
('http://python.org#frag', 'http://python.org', 'frag'),