diff options
| author | Senthil Kumaran <senthil@uthcode.com> | 2012-05-24 13:54:34 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <senthil@uthcode.com> | 2012-05-24 13:54:34 (GMT) |
| commit | 37484dc324b442d1fdab10f05f657cef80845279 (patch) | |
| tree | 97a52c7235afcb348b7d9d614402a187fe108c18 /Lib/test/test_urlparse.py | |
| parent | cd8799f077d236a06a86a9cf707de2a246fb800d (diff) | |
| download | cpython-37484dc324b442d1fdab10f05f657cef80845279.zip cpython-37484dc324b442d1fdab10f05f657cef80845279.tar.gz cpython-37484dc324b442d1fdab10f05f657cef80845279.tar.bz2 | |
Issue #14036: return None when port in urlparse cross 65535
Diffstat (limited to 'Lib/test/test_urlparse.py')
| -rw-r--r-- | Lib/test/test_urlparse.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index e484aaf..3f316d3 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -437,6 +437,11 @@ class UrlParseTestCase(unittest.TestCase): self.assertEqual(p.port, 80) self.assertEqual(p.geturl(), url) + # Verify an illegal port of value greater than 65535 is set as None + url = "http://www.python.org:65536" + p = urlparse.urlsplit(url) + self.assertEqual(p.port, None) + def test_issue14072(self): p1 = urlparse.urlsplit('tel:+31-641044153') self.assertEqual(p1.scheme, 'tel') |
