test_ctypes.py 418 Bytes
Newer Older
1
import unittest
2

3
from test.test_support import run_unittest, import_module
4 5 6
#Skip tests if _ctypes module does not exist
import_module('_ctypes')

7 8

def test_main():
9 10 11 12
    import ctypes.test
    skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0)
    suites = [unittest.makeSuite(t) for t in testcases]
    run_unittest(unittest.TestSuite(suites))
13 14 15

if __name__ == "__main__":
    test_main()