summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2015-11-14 11:47:00 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2015-11-14 11:47:00 (GMT)
commitd226d308a3856e67c654ff3d5924be6d24568388 (patch)
tree54dfa13bd191781f47aa9a7d6055752b98a112fe /Lib/test/test_support.py
parent63c1ebb67b4716720ad6e807d8f6a19042af83eb (diff)
downloadcpython-d226d308a3856e67c654ff3d5924be6d24568388.zip
cpython-d226d308a3856e67c654ff3d5924be6d24568388.tar.gz
cpython-d226d308a3856e67c654ff3d5924be6d24568388.tar.bz2
Issue #23883: Add test.support.check__all__() and test gettext.__all__
Patches by Jacek KoƂodziej.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 2c00417..a9ba460 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -312,6 +312,28 @@ class TestSupport(unittest.TestCase):
self.OtherClass, self.RefClass, ignore=ignore)
self.assertEqual(set(), missing_items)
+ def test_check__all__(self):
+ extra = {'tempdir'}
+ blacklist = {'template'}
+ support.check__all__(self,
+ tempfile,
+ extra=extra,
+ blacklist=blacklist)
+
+ extra = {'TextTestResult', 'installHandler'}
+ blacklist = {'load_tests', "TestProgram", "BaseTestSuite"}
+
+ support.check__all__(self,
+ unittest,
+ ("unittest.result", "unittest.case",
+ "unittest.suite", "unittest.loader",
+ "unittest.main", "unittest.runner",
+ "unittest.signals"),
+ extra=extra,
+ blacklist=blacklist)
+
+ self.assertRaises(AssertionError, support.check__all__, self, unittest)
+
# XXX -follows a list of untested API
# make_legacy_pyc
# is_resource_enabled