[Python-checkins] r54684 - python/trunk/Lib/test/test___all__.py (original) (raw)
collin.winter python-checkins at python.org
Wed Apr 4 20:16:27 CEST 2007
- Previous message: [Python-checkins] r54683 - python/trunk/Lib/test/test_dis.py
- Next message: [Python-checkins] r54685 - in python/trunk: Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: collin.winter Date: Wed Apr 4 20:16:24 2007 New Revision: 54684
Modified: python/trunk/Lib/test/test___all__.py Log: Stop using test_support.verify().
Modified: python/trunk/Lib/test/test___all__.py
--- python/trunk/Lib/test/test___all__.py (original) +++ python/trunk/Lib/test/test___all__.py Wed Apr 4 20:16:24 2007 @@ -1,7 +1,5 @@ import unittest -from test import test_support
-from test.test_support import verify, verbose +from test.test_support import verbose, run_unittest import sys import warnings
@@ -22,15 +20,15 @@ # Silent fail here seems the best route since some modules # may not be available in all environments. return
verify(hasattr(sys.modules[modname], "__all__"),
"%s has no __all__ attribute" % modname)
self.failUnless(hasattr(sys.modules[modname], "__all__"),
"%s has no __all__ attribute" % modname) names = {} exec "from %s import *" % modname in names
if names.has_key("__builtins__"):
if "__builtins__" in names: del names["__builtins__"] keys = set(names) all = set(sys.modules[modname].__all__)
verify(keys==all, "%s != %s" % (keys, all))
def test_all(self): if not sys.platform.startswith('java'):self.assertEqual(keys, all)
@@ -181,7 +179,7 @@
def test_main():
- test_support.run_unittest(AllTest)
- run_unittest(AllTest)
if name == "main": test_main()
- Previous message: [Python-checkins] r54683 - python/trunk/Lib/test/test_dis.py
- Next message: [Python-checkins] r54685 - in python/trunk: Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]