This is going to be part of a larger effort to clean up some of these decorators as the code is getting really unwieldy and difficult to understand and maintain. For now, this patch:
a) Changes the skipIf decorator to be called decorateTest and gives it a mode parameter that says whether we're skipping or xfailing. This allows the skip and xfail decorators to take the same set of arguments and use the same logic for checking the condition so that we only have 1 large and ugly function instead of 2 large and ugly functions that diverge from each other.
b) Update expectedFailureAll and skipIf to call decorateTest, so that all existing code using those decorators go through the common code path, and so that skipIf and expectedFailureAll now support the same set of arguments.
c) Change the way the skip / xfail "reason" is computed to be more friendly.
d) Delete this weird code that says if six.callable(bugnumber) everywhere since it appears to be an invalid assumption about what a bugnumber is (i.e. always a string, never a callable).
Ran the test suite before and after my CL, and the summary statistics at the end are identical in both cases.
In future patches I intend to:
a) Move all the decorators to another file somewhere so they are all isolated and not lost in a sea of 10,000 lines of other code.
b) Remove some of them and consolidate to using the "master" decorators that can are essentially a superset of some of the existing specialized decorators.
c) Add a command line option that causes the test suite to treat skips as xfails.