mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
ParseResultBytes, and SplitResultBytes to urllib.parse.__all__. Patch by Martin Panter.
This commit is contained in:
parent
43a1bed3d2
commit
1515450440
3 changed files with 23 additions and 1 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue