summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-02-17 14:51:41 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-02-17 14:51:41 (GMT)
commit996acf122dbf8d9aa694a16a32ced065f5805cd2 (patch)
treeed565bdce871aff987c7918e7ae1f405d995a468 /Lib/test/test_imp.py
parent9e5d87fa2018a48921d0452850a1d2f0b9fafb1e (diff)
downloadcpython-996acf122dbf8d9aa694a16a32ced065f5805cd2.zip
cpython-996acf122dbf8d9aa694a16a32ced065f5805cd2.tar.gz
cpython-996acf122dbf8d9aa694a16a32ced065f5805cd2.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r--Lib/test/test_imp.py7
1 files changed, 5 insertions, 2 deletions
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 @@ class ImpLock(unittest.TestCase):
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()