Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_ctypes.py @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | b36cb4602e21 |
| children |
| 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 |
|
59905
224b70d3d1d4
Get rid of buffer() in test_ctypes: backport the 3.x tests.
Florent Xicluna <florent.xicluna@gmail.com>
parents:
59783
diff
changeset
|
3 from test.test_support import run_unittest, import_module |
|
63572
51102abdec50
Merged revisions 79165 via svnmerge from
Ezio Melotti <ezio.melotti@gmail.com>
parents:
41554
diff
changeset
|
4 #Skip tests if _ctypes module does not exist |
|
51102abdec50
Merged revisions 79165 via svnmerge from
Ezio Melotti <ezio.melotti@gmail.com>
parents:
41554
diff
changeset
|
5 import_module('_ctypes') |
|
51102abdec50
Merged revisions 79165 via svnmerge from
Ezio Melotti <ezio.melotti@gmail.com>
parents:
41554
diff
changeset
|
6 |
|
36900
9227ae3db7ed
Trivial test for ctypes, more to come
Thomas Heller <theller@ctypes.org>
parents:
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 def test_main(): |
|
59905
224b70d3d1d4
Get rid of buffer() in test_ctypes: backport the 3.x tests.
Florent Xicluna <florent.xicluna@gmail.com>
parents:
59783
diff
changeset
|
9 import ctypes.test |
|
224b70d3d1d4
Get rid of buffer() in test_ctypes: backport the 3.x tests.
Florent Xicluna <florent.xicluna@gmail.com>
parents:
59783
diff
changeset
|
10 skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) |
|
224b70d3d1d4
Get rid of buffer() in test_ctypes: backport the 3.x tests.
Florent Xicluna <florent.xicluna@gmail.com>
parents:
59783
diff
changeset
|
11 suites = [unittest.makeSuite(t) for t in testcases] |
|
224b70d3d1d4
Get rid of buffer() in test_ctypes: backport the 3.x tests.
Florent Xicluna <florent.xicluna@gmail.com>
parents:
59783
diff
changeset
|
12 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
|
13 |
|
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 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
|
15 test_main() |
