Actually run these tests from regrtest.py.
There was no test_main() and the main body was protected
by if __name__ == '__main__' so the test didn't happen
on import either.
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index ebecf82..cd26b0a 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -1,7 +1,7 @@
import imp
import unittest
-from test_support import TestFailed
+from test_support import TestFailed, run_unittest
class ImpLock(unittest.TestCase):
@@ -22,5 +22,8 @@
raise TestFailed, \
"release_lock() without lock should raise RuntimeError"
+def test_main():
+ run_unittest(ImpLock)
+
if __name__ == "__main__":
- test_support.run_unittest(ImpLock)
+ test_main()