File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565__all__ = [
6666 'ArgumentParser' ,
6767 'ArgumentError' ,
68- 'Namespace' ,
69- 'Action' ,
68+ 'ArgumentTypeError' ,
7069 'FileType' ,
7170 'HelpFormatter' ,
71+ 'ArgumentDefaultsHelpFormatter' ,
7272 'RawDescriptionHelpFormatter' ,
7373 'RawTextHelpFormatter' ,
74- 'ArgumentDefaultsHelpFormatter' ,
74+ 'Namespace' ,
75+ 'Action' ,
76+ 'ONE_OR_MORE' ,
77+ 'OPTIONAL' ,
78+ 'PARSER' ,
79+ 'REMAINDER' ,
80+ 'SUPPRESS' ,
81+ 'ZERO_OR_MORE' ,
7582]
7683
7784
Original file line number Diff line number Diff line change 11# Author: Steven J. Bethard <[email protected] >. 22
33import codecs
4+ import inspect
45import os
56import shutil
67import sys
@@ -4245,6 +4246,15 @@ def test(self):
42454246 for name in argparse .__all__ :
42464247 self .assertTrue (hasattr (argparse , name ))
42474248
4249+ def test_all_exports_everything_but_modules (self ):
4250+ items = [
4251+ name
4252+ for name , value in vars (argparse ).items ()
4253+ if not name .startswith ("_" )
4254+ if not inspect .ismodule (value )
4255+ ]
4256+ self .assertEqual (sorted (items ), sorted (argparse .__all__ ))
4257+
42484258def test_main ():
42494259 # silence warnings about version argument - these are expected
42504260 with support .check_warnings (
You can’t perform that action at this time.
0 commit comments