From: R David Murray Date: Fri, 22 Mar 2013 00:56:51 +0000 (-0400) Subject: #17472: add tests for a couple of untested methods in urllib.urlparse. X-Git-Tag: v3.4.0a1~1116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f516388de83f945250dfa75779c059f453e0c811;p=python #17472: add tests for a couple of untested methods in urllib.urlparse. Original patch by Daniel Wozniak. --- diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 378a427bc5..c938f09951 100755 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -847,6 +847,14 @@ class UrlParseTestCase(unittest.TestCase): self.assertEqual(p1.path, '863-1234') self.assertEqual(p1.params, 'phone-context=+1-914-555') + def test_unwrap(self): + url = urllib.parse.unwrap('') + self.assertEqual(url, 'type://host/path') + + def test_Quoter_repr(self): + quoter = urllib.parse.Quoter(urllib.parse._ALWAYS_SAFE) + self.assertIn('Quoter', repr(quoter)) + def test_main(): support.run_unittest(UrlParseTestCase)