diff options
author | Steve Dower <steve.dower@python.org> | 2019-04-30 12:03:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 12:03:02 +0000 |
commit | d537ab0ff9767ef024f26246899728f0116b1ec3 (patch) | |
tree | 03f8dca564bd759d5087c62d01179a629fe7584a /Lib/test/test_urlparse.py | |
parent | b84cb70880a0acfcbbaca7bcda405af08f94d269 (diff) | |
download | cpython-git-d537ab0ff9767ef024f26246899728f0116b1ec3.tar.gz |
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r-- | Lib/test/test_urlparse.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 0faf2bbb64..d0365ecab7 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -1011,6 +1011,12 @@ class UrlParseTestCase(unittest.TestCase): self.assertIn('\u2100', denorm_chars) self.assertIn('\uFF03', denorm_chars) + # bpo-36742: Verify port separators are ignored when they + # existed prior to decomposition + urllib.parse.urlsplit('http://\u30d5\u309a:80') + with self.assertRaises(ValueError): + urllib.parse.urlsplit('http://\u30d5\u309a\ufe1380') + for scheme in ["http", "https", "ftp"]: for c in denorm_chars: url = "{}://netloc{}false.netloc/path".format(scheme, c) |