it was being run, but no tests were actually executed!
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):
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()