summaryrefslogtreecommitdiff
path: root/Lib/test/test_urlparse.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-05-19 17:15:19 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2012-05-19 17:15:19 +0300
commit6709b7d5d1b8643856a3e0f864c0657a927f427a (patch)
tree56ca8f96edcb3a3e158e42c7003efdae583f1a11 /Lib/test/test_urlparse.py
parent5fa4a896016e8a265b6afee64c61a1083c6ffa47 (diff)
downloadcpython-git-6709b7d5d1b8643856a3e0f864c0657a927f427a.tar.gz
#14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter.
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rwxr-xr-xLib/test/test_urlparse.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 578438159d..73150cffa6 100755
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -806,6 +806,13 @@ class UrlParseTestCase(unittest.TestCase):
encoding='utf-8')
self.assertRaises(TypeError, urllib.parse.quote, b'foo', errors='strict')
+ def test_issue14072(self):
+ p1 = urllib.parse.urlsplit('tel:+31-641044153')
+ self.assertEqual(p1.scheme, 'tel')
+ self.assertEqual(p1.path, '+31-641044153')
+ p2 = urllib.parse.urlsplit('tel:+31641044153')
+ self.assertEqual(p2.scheme, 'tel')
+ self.assertEqual(p2.path, '+31641044153')
def test_main():
support.run_unittest(UrlParseTestCase)