summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2010-11-01 15:23:12 (GMT)
committerSteven Bethard <steven.bethard@gmail.com>2010-11-01 15:23:12 (GMT)
commit72c553829a271923fc110c23af49b8a4a0a5367e (patch)
tree7116d11b89e447ded4e900369d94ff7086605bfe /Lib/test/test_argparse.py
parentc4ac887917e4b5d97ff1d761c68a52722044213c (diff)
downloadcpython-72c553829a271923fc110c23af49b8a4a0a5367e.zip
cpython-72c553829a271923fc110c23af49b8a4a0a5367e.tar.gz
cpython-72c553829a271923fc110c23af49b8a4a0a5367e.tar.bz2
Get argparse.__all__ back up to date (issue 9353)
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 08dd91b..358179b 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -1,6 +1,7 @@
# 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(