summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urlparse.py
diff options
context:
space:
mode:
authorRĂ©mi Lapeyre <remi.lapeyre@henki.fr>2019-05-27 13:43:45 (GMT)
committerCheryl Sabella <cheryl.sabella@gmail.com>2019-05-27 13:43:45 (GMT)
commit674ee1260025ff36f27e5d70ff6b66e3aab880bf (patch)
tree454d232beffc625bac7a51a9b2ae5e63818e774a /Lib/test/test_urlparse.py
parent1f39c28e489cca0397fc4c3675d13569318122ac (diff)
downloadcpython-674ee1260025ff36f27e5d70ff6b66e3aab880bf.zip
cpython-674ee1260025ff36f27e5d70ff6b66e3aab880bf.tar.gz
cpython-674ee1260025ff36f27e5d70ff6b66e3aab880bf.tar.bz2
bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481)
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r--Lib/test/test_urlparse.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index d0365ec..4344765 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1169,8 +1169,10 @@ class Utility_Tests(unittest.TestCase):
'http://www.python.org/medi\u00e6val')
def test_unwrap(self):
- url = urllib.parse._unwrap('<URL:type://host/path>')
- self.assertEqual(url, 'type://host/path')
+ for wrapped_url in ('<URL:scheme://host/path>', '<scheme://host/path>',
+ 'URL:scheme://host/path', 'scheme://host/path'):
+ url = urllib.parse.unwrap(wrapped_url)
+ self.assertEqual(url, 'scheme://host/path')
class DeprecationTest(unittest.TestCase):
@@ -1251,12 +1253,6 @@ class DeprecationTest(unittest.TestCase):
self.assertEqual(str(cm.warning),
'urllib.parse.to_bytes() is deprecated as of 3.8')
- def test_unwrap(self):
- with self.assertWarns(DeprecationWarning) as cm:
- urllib.parse.unwrap('')
- self.assertEqual(str(cm.warning),
- 'urllib.parse.unwrap() is deprecated as of 3.8')
-
if __name__ == "__main__":
unittest.main()