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.
This commit is contained in:
Neal Norwitz 2003-02-17 14:51:41 +00:00
parent 9e5d87fa20
commit 996acf122d
6 changed files with 38 additions and 10 deletions

View file

@ -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()