(f)
| 129 | msg = 'Test skipped due to known failure' |
| 130 | |
| 131 | def knownfail_decorator(f): |
| 132 | # Local import to avoid a hard nose dependency and only incur the |
| 133 | # import time overhead at actual test-time. |
| 134 | import nose |
| 135 | |
| 136 | def knownfailer(*args, **kwargs): |
| 137 | if fail_condition: |
| 138 | raise KnownFailureTest(msg) |
| 139 | else: |
| 140 | return f(*args, **kwargs) |
| 141 | return nose.tools.make_decorator(f)(knownfailer) |
| 142 | |
| 143 | return knownfail_decorator |
nothing calls this directly
no outgoing calls
no test coverage detected