New submission from Zachary Ware:
Attached is a patch that aims to clean up the ctypes tests a bit, namely by
removing the custom resource management (which conflicts with regrtest), the
custom test discovery (which is better left to unittest), and the custom test
running (which is better covered by unittest and regrtest). The one thing I'm
not entirely confident about removing is the custom refleak testing, but it
does not seem to work correctly in 3.x anyway (though in 2.7, the custom
refleak hunter reports "leaks" that the regrtest refleak hunter does not).
There were only a few uses of the custom resource management, all of which were
replaced or removed. test_SEH in test_win32 used "requires('SEH')", but that
test should now be sufficiently guarded with unittest skip decorators (only
trying the test on Windows, with Python built in Release configuration by
MSVC). test_PyLong_Long in test_python_api used "requires('refcount')", but
that should be covered by the @support.refcount_test decorator (added long
after the 'requires' call). Two instances of "is_resource_enabled('printing')"
were replaced by "if test.support.verbose".
The same number of tests run (all successfully) on Windows, I have not yet
tested on any other platforms.
----------
components: Tests, ctypes
files: ctypes.test-cleanup.diff
keywords: patch
messages: 223891
nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Clean up ctypes.test, use unittest test discovery
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36073/ctypes.test-cleanup.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com