Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: ee01a5e5199e2fb13496facec18c3de0db35fe8a authored by cvs2svn on 13 July 2001, 15:10:55 UTC
This commit was manufactured by cvs2svn to create tag 'r211c1'.
Tip revision: ee01a5e
test_capi.py
# Run the _testcapi module tests (tests for the Python/C API):  by defn,
# these are all functions _testcapi exports whose name begins with 'test_'.

import sys
import test_support
import _testcapi

for name in dir(_testcapi):
    if name.startswith('test_'):
        test = getattr(_testcapi, name)
        if test_support.verbose:
            print "internal", name
        try:
            test()
        except _testcapi.error:
            raise test_support.TestFailed, sys.exc_info()[1]
back to top