Tim Peters | 9ea17ac | 2001-02-02 05:57:15 +0000 | [diff] [blame] | 1 | # Run the _test module tests (tests for the Python/C API): by defn, these |
2 | # are all functions _test exports whose name begins with 'test_'. | ||||
3 | |||||
4 | import sys | ||||
5 | import test_support | ||||
6 | import _test | ||||
7 | |||||
8 | for name in dir(_test): | ||||
9 | if name.startswith('test_'): | ||||
10 | test = getattr(_test, name) | ||||
11 | if test_support.verbose: | ||||
12 | print "internal", name | ||||
13 | try: | ||||
14 | test() | ||||
15 | except _test.error: | ||||
16 | raise test_support.TestFailed, sys.exc_info()[1] |