http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/test/pytest_patcher.py Mercurial Repository: p/roundup/code: test/pytest_patcher.py history 2016-06-30T12:38:23+10:00 Fix mark_class decorator to work in all cases http://hg.code.sf.net:8000/p/roundup/code/#changeset-1c94afabb2cbfc486fbcf641c403a59c26469168 John Kristensen john@jerrykan.com 2016-06-30T12:38:23+10:00 2016-06-30T12:38:23+10:00
changeset 1c94afabb2cb
branch
bookmark
tag
user John Kristensen <john@jerrykan.com>
description Fix mark_class decorator to work in all cases

The 'mark_class' decorator assumed that all test functions started with
'test_' which is the common naming convention these days. The roundup
codebase predates many of the current common conventions though though,
so many tests don't include the underscore. We now correctly check for
any test function starting with 'test' and also ensure the 'mark_class'
will also work with functions as well as classes.

This has been tested will all package dependencies missing, and all the
tests correctly skip. All the tests also pass a full test run without
any tests being skipped. A smattering of other runs of individual test
files and enabled dependencies seem to indicate that all skipping should
work as expected now.
files
Improved work-around for pytest markers bug http://hg.code.sf.net:8000/p/roundup/code/#changeset-43a1f7fe39f502d3dc1ba5c560a81a629c924619 John Kristensen john@jerrykan.com 2016-06-28T15:39:38+10:00 2016-06-28T15:39:38+10:00
changeset 43a1f7fe39f5
branch
bookmark
tag
user John Kristensen <john@jerrykan.com>
description Improved work-around for pytest markers bug

The previous fix was only a partial solution. Any test class sharing a
parent with, and appearing after, a skipped test class was being skipped
(not just other test classes using the skip/skipif marker). Now only
tests that should be skipped will be skipped, the rest should run as
normal.
files