diff options
author | Collin Winter <collinw@gmail.com> | 2007-04-25 17:29:52 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-04-25 17:29:52 (GMT) |
commit | c2898c5a678e6dd00c3e0b18a214fcd7a3533800 (patch) | |
tree | dfaedbddee7b0ef79a19527788b8a720658e79bb /Lib/test/test_bsddb3.py | |
parent | 0d4c06e06e5ee1f3bb1fa8068114bd700d74864a (diff) | |
download | cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.zip cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.tar.gz cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.tar.bz2 |
Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
Diffstat (limited to 'Lib/test/test_bsddb3.py')
-rw-r--r-- | Lib/test/test_bsddb3.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py index 8b0c50c..349a6b0 100644 --- a/Lib/test/test_bsddb3.py +++ b/Lib/test/test_bsddb3.py @@ -4,11 +4,11 @@ Run all test cases. """ import sys import unittest -from test.test_support import requires, verbose, run_suite, unlink +from test.test_support import requires, verbose, run_unittest, unlink # When running as a script instead of within the regrtest framework, skip the # requires test, since it's obvious we want to run them. -if __name__ <> '__main__': +if __name__ != '__main__': requires('bsddb') verbose = False @@ -58,9 +58,7 @@ def suite(): # For invocation through regrtest def test_main(): - tests = suite() - run_suite(tests) - + run_unittest(suite()) # For invocation as a script if __name__ == '__main__': @@ -73,4 +71,4 @@ if __name__ == '__main__': print 'python version: %s' % sys.version print '-=' * 38 - unittest.main(defaultTest='suite') + test_main() |