diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2010-11-01 15:24:42 +0000 |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2010-11-01 15:24:42 +0000 |
commit | 931906a7f5974865c9e928332eb6dd8ba10a91c7 (patch) | |
tree | 8a49a5c67daa3ed5f8bac0bbafa512fbe8c87cc8 /Lib/test | |
parent | 19e9fefc660d623ce7c31fb008cde1157ae12aba (diff) | |
download | cpython-git-931906a7f5974865c9e928332eb6dd8ba10a91c7.tar.gz |
Merged revisions 86086 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86086 | steven.bethard | 2010-11-01 16:23:12 +0100 (Mon, 01 Nov 2010) | 1 line
Get argparse.__all__ back up to date (issue 9353)
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_argparse.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 894ad58d26..349de7b817 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 @@ -4256,6 +4257,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 test_support.check_warnings( |