Report skipped tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.testrunner |
Fix Released
|
Undecided
|
Tres Seaver |
Bug Description
Since Python 2.7, Python 3.1 and when using the unittest2 package, developers can specify that some tests must be skipped and not launched by the test runner.
I made a preliminary patch which adds support in zope.testrunner to report skipped tests. The code should work even if the underlying unittest library doesn't support the "skip" feature.
It breaks the API of the formatters, because I need to specify the number of skipped tests in the summary line and I added a method to report when one test is being skipped.
I didn't updated the tests of zope.testrunner itself, because I would like to have an early feedback on the implementation:
* is it OK to break the API of the formatters?
* is it OK to break the format of the defaut text outputs, since it now always add the number of skipped tests?
If it seems good for the maintainer and they are willing to accept the patch, I'll update it with the fix for the zope.testrunner tests themselves.
I'm looking at the patch now. Could we make the formatter API backward-
compatible by putting the 'n_skipped' argument last, and defaulting it to
'None'? I realize that it makes the API read somewhat awkwardly, but I
think that having things "Just Work" under older Python versions, or where
'unittest2' is not present, trumps that. We could then keep the output text
compatible if 'n_skipped' was not passed (those same cases).