diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-07 16:09:01 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-07 16:09:01 (GMT) |
commit | 1515450440f901bdb15e1ad0211a498f54053c3f (patch) | |
tree | 9baa8cb78832d8b816ef2bb05120f425cbae22db /Lib/test/test_urlparse.py | |
parent | 43a1bed3d21605081581f7f3eb8a731cd71ad51e (diff) | |
download | cpython-1515450440f901bdb15e1ad0211a498f54053c3f.zip cpython-1515450440f901bdb15e1ad0211a498f54053c3f.tar.gz cpython-1515450440f901bdb15e1ad0211a498f54053c3f.tar.bz2 |
Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
ParseResultBytes, and SplitResultBytes to urllib.parse.__all__.
Patch by Martin Panter.
Diffstat (limited to 'Lib/test/test_urlparse.py')
-rw-r--r-- | Lib/test/test_urlparse.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 0481f0b..5a3aa33 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -840,6 +840,22 @@ class UrlParseTestCase(unittest.TestCase): quoter = urllib.parse.Quoter(urllib.parse._ALWAYS_SAFE) self.assertIn('Quoter', repr(quoter)) + def test_all(self): + expected = [] + undocumented = { + 'splitattr', 'splithost', 'splitnport', 'splitpasswd', + 'splitport', 'splitquery', 'splittag', 'splittype', 'splituser', + 'splitvalue', + 'Quoter', 'ResultBase', 'clear_cache', 'to_bytes', 'unwrap', + } + for name in dir(urllib.parse): + if name.startswith('_') or name in undocumented: + continue + object = getattr(urllib.parse, name) + if getattr(object, '__module__', None) == 'urllib.parse': + expected.append(name) + self.assertCountEqual(urllib.parse.__all__, expected) + class Utility_Tests(unittest.TestCase): """Testcase to test the various utility functions in the urllib.""" |