diff options
author | Collin Winter <collinw@gmail.com> | 2007-04-04 18:16:24 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-04-04 18:16:24 (GMT) |
commit | 80e8c998a27841ba2e36db897f9e0a76d46cfcae (patch) | |
tree | 0ccde7fc4ae2ada4ed8658bd4c49e54f0fd00327 /Lib | |
parent | 9475db7662c972a0048da86118221babecb20fd0 (diff) | |
download | cpython-80e8c998a27841ba2e36db897f9e0a76d46cfcae.zip cpython-80e8c998a27841ba2e36db897f9e0a76d46cfcae.tar.gz cpython-80e8c998a27841ba2e36db897f9e0a76d46cfcae.tar.bz2 |
Stop using test_support.verify().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test___all__.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index dbc6bc3..5e7d34e 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -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 @@ class AllTest(unittest.TestCase): # 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)) + self.assertEqual(keys, all) def test_all(self): if not sys.platform.startswith('java'): @@ -181,7 +179,7 @@ class AllTest(unittest.TestCase): def test_main(): - test_support.run_unittest(AllTest) + run_unittest(AllTest) if __name__ == "__main__": test_main() |