annotate Lib/test/test_ctypes.py @ 78069:a8aa77458e12 3.2

Add c_size_t and c_ssize_t to the ctypes summary table.
author Antoine Pitrou <solipsis@pitrou.net>
date Thu, 12 Jul 2012 20:31:50 +0200
parents f84340886936
children 42d4a29509c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36911
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
1 import unittest
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
2
52625
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 47201
diff changeset
3 from test.support import run_unittest, import_module
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 47201
diff changeset
4
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 47201
diff changeset
5 # Skip tests if _ctypes module was not built.
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 47201
diff changeset
6 import_module('_ctypes')
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 47201
diff changeset
7
36911
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
8 import ctypes.test
36900
9227ae3db7ed Trivial test for ctypes, more to come
Thomas Heller <theller@ctypes.org>
parents:
diff changeset
9
36911
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
10 def test_main():
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
11 skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0)
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
12 suites = [unittest.makeSuite(t) for t in testcases]
41554
06145fbc7ab9 Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents: 36911
diff changeset
13 run_unittest(unittest.TestSuite(suites))
36911
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
14
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
15 if __name__ == "__main__":
b4e89d29bea8 Replace the trivial ctypes test (did only an import) with the real test suite.
Thomas Heller <theller@ctypes.org>
parents: 36900
diff changeset
16 test_main()