diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-02-02 05:57:15 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-02-02 05:57:15 (GMT) |
commit | 9ea17ac59570faab41e290f900057882f816fda6 (patch) | |
tree | 8d6800b525705c975703e5cd191f479d4fbd9a2a /Lib/test/test_capi.py | |
parent | 6270031f4e457ed8f1335e1a46c11104eb4c308b (diff) | |
download | cpython-9ea17ac59570faab41e290f900057882f816fda6.zip cpython-9ea17ac59570faab41e290f900057882f816fda6.tar.gz cpython-9ea17ac59570faab41e290f900057882f816fda6.tar.bz2 |
Patch derived from Trent's 101162: a Python/C API testing framework.
STILL NEEDS UNIX BUILD CHANGES.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py new file mode 100644 index 0000000..8b39829 --- /dev/null +++ b/Lib/test/test_capi.py @@ -0,0 +1,16 @@ +# Run the _test module tests (tests for the Python/C API): by defn, these +# are all functions _test exports whose name begins with 'test_'. + +import sys +import test_support +import _test + +for name in dir(_test): + if name.startswith('test_'): + test = getattr(_test, name) + if test_support.verbose: + print "internal", name + try: + test() + except _test.error: + raise test_support.TestFailed, sys.exc_info()[1] |