diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2006-04-10 18:33:17 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2006-04-10 18:33:17 (GMT) |
commit | bd0c10f7c99db3272b5db2b1f21ed43b96d260c0 (patch) | |
tree | 0ccd8e4ae2eee8319a8c5cfbf131074d97c61a99 /Lib | |
parent | 93149d935d08c5ea1c21ebc74d11016026c0a6b6 (diff) | |
download | cpython-bd0c10f7c99db3272b5db2b1f21ed43b96d260c0.zip cpython-bd0c10f7c99db3272b5db2b1f21ed43b96d260c0.tar.gz cpython-bd0c10f7c99db3272b5db2b1f21ed43b96d260c0.tar.bz2 |
test_contextlib wasn't actually being run by regrtest.py. Or more precisely,
it was being run, but no tests were actually executed!
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_contextlib.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py index cd8895e..7d601fa 100644 --- a/Lib/test/test_contextlib.py +++ b/Lib/test/test_contextlib.py @@ -2,12 +2,14 @@ from __future__ import with_statement +import sys import os import decimal import tempfile import unittest import threading from contextlib import * # Tests __all__ +from test.test_support import run_suite class ContextManagerTestCase(unittest.TestCase): @@ -327,5 +329,11 @@ class DecimalContextTestCase(unittest.TestCase): self.fail("Didn't raise ZeroDivisionError") +# This is needed to make the test actually run under regrtest.py! +def test_main(): + run_suite( + unittest.defaultTestLoader.loadTestsFromModule(sys.modules[__name__]) + ) + if __name__ == "__main__": - unittest.main() + test_main() |