Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 16ec24a1920dd4e94e2890032b5c4160621d526d authored by Barry Warsaw on 04 June 2011, 00:02:47 UTC
Replay svn r88850.
Tip revision: 16ec24a
test_ctypes.py
import unittest

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


def test_main():
    with _check_py3k_warnings(("buffer.. not supported", DeprecationWarning),
                              ("classic (int|long) division", DeprecationWarning),):
        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))

if __name__ == "__main__":
    test_main()
back to top