Zachary Ware added the comment: Here's a patch. It turned out to be much more extensive than I expected, and the diff turned into a huge huge ugly monster that I hope Rietveld can help to make sense of, since the majority of the diff is simply changes in indentation level.
The most major change of this patch is the addition of a "needs_symbol" decorator to ctypes.test.__init__, which is then used throughout the tests. Pre-patch, the tests are littered with constructs like this: """ class TestSomething(unittest.TestCase): try: c_wchar except NameError: pass else: def test_something_using_c_wchar(self): ... """ These have all (I think) been simplified to: """ class TestSomething(unittest.TestCase): @needs_symbol('c_wchar') def test_something_using_c_wchar(self): ... """ There are also several instances of tests guarded by "if sys.platform = 'win32':" or similar, which have been turned into @unittest.skipUnless, and several tests which were commented out which have been uncommented and given unconditional skips. On my Gentoo machine at home, the patch takes the ctypes test suite from 348 tests with 1 skip to 422 tests with 78 skips. ---------- Added file: http://bugs.python.org/file32634/skip_tests_ctypes.v2.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19493> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com