Thomas Heller | e317d0e | 2006-03-09 07:21:33 +0000 | [diff] [blame] | 1 | import unittest |
Thomas Heller | 200af39 | 2006-03-08 20:38:11 +0000 | [diff] [blame] | 2 | |
Ezio Melotti | 520378f | 2013-03-01 10:55:17 +0200 | [diff] [blame] | 3 | from test.support import import_module |
R. David Murray | a21e4ca | 2009-03-31 23:16:50 +0000 | [diff] [blame] | 4 | |
| 5 | # Skip tests if _ctypes module was not built. |
| 6 | import_module('_ctypes') |
| 7 | |
Thomas Heller | e317d0e | 2006-03-09 07:21:33 +0000 | [diff] [blame] | 8 | import ctypes.test |
| 9 | |
Ezio Melotti | 520378f | 2013-03-01 10:55:17 +0200 | [diff] [blame] | 10 | def load_tests(*args): |
Thomas Heller | e317d0e | 2006-03-09 07:21:33 +0000 | [diff] [blame] | 11 | skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) |
| 12 | suites = [unittest.makeSuite(t) for t in testcases] |
Ezio Melotti | 520378f | 2013-03-01 10:55:17 +0200 | [diff] [blame] | 13 | return unittest.TestSuite(suites) |
Thomas Heller | e317d0e | 2006-03-09 07:21:33 +0000 | [diff] [blame] | 14 | |
| 15 | if __name__ == "__main__": |
Ezio Melotti | 520378f | 2013-03-01 10:55:17 +0200 | [diff] [blame] | 16 | unittest.main() |