# HG changeset patch # Parent 5ea093a41198b7ca4d8fc4f8d626cbf2aacc81ed diff -r 5ea093a41198 Lib/test/test_urlparse.py --- a/Lib/test/test_urlparse.py Sat Feb 07 22:20:48 2015 -0800 +++ b/Lib/test/test_urlparse.py Sun Feb 08 11:43:04 2015 +0000 @@ -890,6 +890,22 @@ def test_Quoter_repr(self): 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) def test_main(): diff -r 5ea093a41198 Lib/urllib/parse.py --- a/Lib/urllib/parse.py Sat Feb 07 22:20:48 2015 -0800 +++ b/Lib/urllib/parse.py Sun Feb 08 11:43:04 2015 +0000 @@ -34,7 +34,9 @@ __all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag", "urlsplit", "urlunsplit", "urlencode", "parse_qs", "parse_qsl", "quote", "quote_plus", "quote_from_bytes", - "unquote", "unquote_plus", "unquote_to_bytes"] + "unquote", "unquote_plus", "unquote_to_bytes", + "DefragResult", "ParseResult", "SplitResult", + "DefragResultBytes", "ParseResultBytes", "SplitResultBytes"] # A classification of schemes ('' means apply by default) uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',