diff options
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_urlparse.py | 12 | 
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index d0365ecab7..4344765637 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()  | 
