diff options
author | Senthil Kumaran <skumaran@gatech.edu> | 2017-04-05 04:19:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 04:19:43 (GMT) |
commit | 257b980b316a5206ecf6c23b958e2b7c4df4f3de (patch) | |
tree | 740cc98c682ee552d4822600f37b4dc17ceff93e /Lib/test/test_urlparse.py | |
parent | f78b119364b521307237a1484ba5f43f42300898 (diff) | |
download | cpython-257b980b316a5206ecf6c23b958e2b7c4df4f3de.zip cpython-257b980b316a5206ecf6c23b958e2b7c4df4f3de.tar.gz cpython-257b980b316a5206ecf6c23b958e2b7c4df4f3de.tar.bz2 |
correct parse_qs and parse_qsl test case descriptions. (#968)
* correct parse_qs and parse_qsl test case descriptions.
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r-- | Lib/test/test_urlparse.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 99c5c03..3c89ed9 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -6,8 +6,8 @@ RFC2396_BASE = "http://a/b/c/d;p?q" RFC3986_BASE = 'http://a/b/c/d;p?q' SIMPLE_BASE = 'http://a/b/c/d' -# A list of test cases. Each test case is a two-tuple that contains -# a string with the query and a dictionary with the expected result. +# Each parse_qsl testcase is a two-tuple that contains +# a string with the query and a list with the expected result. parse_qsl_test_cases = [ ("", []), @@ -42,6 +42,9 @@ parse_qsl_test_cases = [ (b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]), ] +# Each parse_qs testcase is a two-tuple that contains +# a string with the query and a dictionary with the expected result. + parse_qs_test_cases = [ ("", {}), ("&", {}), @@ -290,7 +293,6 @@ class UrlParseTestCase(unittest.TestCase): def test_RFC2396(self): # cases from RFC 2396 - self.checkJoin(RFC2396_BASE, 'g:h', 'g:h') self.checkJoin(RFC2396_BASE, 'g', 'http://a/b/c/g') self.checkJoin(RFC2396_BASE, './g', 'http://a/b/c/g') @@ -333,9 +335,7 @@ class UrlParseTestCase(unittest.TestCase): # self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g') # self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g') - def test_RFC3986(self): - # Test cases from RFC3986 self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y') self.checkJoin(RFC3986_BASE, ';x', 'http://a/b/c/;x') self.checkJoin(RFC3986_BASE, 'g:h','g:h') @@ -363,7 +363,7 @@ class UrlParseTestCase(unittest.TestCase): self.checkJoin(RFC3986_BASE, '../../g','http://a/g') self.checkJoin(RFC3986_BASE, '../../../g', 'http://a/g') - #Abnormal Examples + # Abnormal Examples # The 'abnormal scenarios' are incompatible with RFC2986 parsing # Tests are here for reference. |