]> granicus.if.org Git - python/commitdiff
Replace the trivial ctypes test (did only an import) with the real test suite.
authorThomas Heller <theller@ctypes.org>
Thu, 9 Mar 2006 07:21:33 +0000 (07:21 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 9 Mar 2006 07:21:33 +0000 (07:21 +0000)
Lib/test/test_ctypes.py

index 8a931d97a12a832583143448cc9b7b743f241f40..fd2032bc6d2da5f0e130bab2241d7b3ae6dc21ac 100644 (file)
@@ -1,4 +1,12 @@
-# trivial test
+import unittest
 
-import _ctypes
-import ctypes
+from test.test_support import run_suite
+import ctypes.test
+
+def test_main():
+    skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0)
+    suites = [unittest.makeSuite(t) for t in testcases]
+    run_suite(unittest.TestSuite(suites))
+
+if __name__ == "__main__":
+    test_main()