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_contextlib.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_contextlib.py')
| -rw-r--r-- | Lib/test/test_contextlib.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py index 747785d..898bcf2 100644 --- a/Lib/test/test_contextlib.py +++ b/Lib/test/test_contextlib.py @@ -9,7 +9,7 @@ import tempfile import unittest import threading from contextlib import * # Tests __all__ -from test.test_support import run_suite +from test import test_support class ContextManagerTestCase(unittest.TestCase): @@ -332,9 +332,7 @@ class LockContextTestCase(unittest.TestCase): # This is needed to make the test actually run under regrtest.py! def test_main(): - run_suite( - unittest.defaultTestLoader.loadTestsFromModule(sys.modules[__name__]) - ) + test_support.run_unittest(__name__) if __name__ == "__main__": test_main() |
