Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
72c55382
Commit
72c55382
authored
Nov 01, 2010
by
Steven Bethard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get argparse.__all__ back up to date (issue 9353)
parent
c4ac8879
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
Lib/argparse.py
Lib/argparse.py
+10
-3
Lib/test/test_argparse.py
Lib/test/test_argparse.py
+10
-0
No files found.
Lib/argparse.py
View file @
72c55382
...
...
@@ -65,13 +65,20 @@ __version__ = '1.1'
__all__
=
[
'ArgumentParser'
,
'ArgumentError'
,
'Namespace'
,
'Action'
,
'ArgumentTypeError'
,
'FileType'
,
'HelpFormatter'
,
'ArgumentDefaultsHelpFormatter'
,
'RawDescriptionHelpFormatter'
,
'RawTextHelpFormatter'
,
'ArgumentDefaultsHelpFormatter'
,
'Namespace'
,
'Action'
,
'ONE_OR_MORE'
,
'OPTIONAL'
,
'PARSER'
,
'REMAINDER'
,
'SUPPRESS'
,
'ZERO_OR_MORE'
,
]
...
...
Lib/test/test_argparse.py
View file @
72c55382
# Author: Steven J. Bethard <steven.bethard@gmail.com>.
import
codecs
import
inspect
import
os
import
shutil
import
sys
...
...
@@ -4245,6 +4246,15 @@ class TestImportStar(TestCase):
for
name
in
argparse
.
__all__
:
self
.
assertTrue
(
hasattr
(
argparse
,
name
))
def
test_all_exports_everything_but_modules
(
self
):
items
=
[
name
for
name
,
value
in
vars
(
argparse
).
items
()
if
not
name
.
startswith
(
"_"
)
if
not
inspect
.
ismodule
(
value
)
]
self
.
assertEqual
(
sorted
(
items
),
sorted
(
argparse
.
__all__
))
def
test_main
():
# silence warnings about version argument - these are expected
with
support
.
check_warnings
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment