home *** CD-ROM | disk | FTP | other *** search
/ Freelog 33 / Freelog033.iso / Progr / Python-2.2.1.exe / TEST_CAPI.PY < prev    next >
Encoding:
Text File  |  2001-04-13  |  509 b   |  17 lines

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