mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
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:
parent
9e5d87fa20
commit
996acf122d
6 changed files with 38 additions and 10 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue