summaryrefslogtreecommitdiffstats
path: root/Lib/test/test___all__.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-13 00:12:30 (GMT)
committerBrett Cannon <brett@python.org>2013-06-13 00:12:30 (GMT)
commitc9a1bfed5d820b681debca52554fea76ba0a9ae0 (patch)
treeba3c9fd41acbffaa32bf6e09a323471778064be7 /Lib/test/test___all__.py
parent603dcf27140ca109d11496eb4a57fe6440ddc915 (diff)
downloadcpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.zip
cpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.tar.gz
cpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.tar.bz2
Move test___all__ over to unittest.main() and use ModuleNotFoundError
Diffstat (limited to 'Lib/test/test___all__.py')
-rw-r--r--Lib/test/test___all__.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index 093ea2f..d0d7fa3 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -75,7 +75,7 @@ class AllTest(unittest.TestCase):
try:
import rlcompleter
import locale
- except ImportError:
+ except ModuleNotFoundError:
pass
else:
locale.setlocale(locale.LC_CTYPE, 'C')
@@ -113,8 +113,5 @@ class AllTest(unittest.TestCase):
print('Following modules failed to be imported:', failed_imports)
-def test_main():
- support.run_unittest(AllTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()