MCPcopy Create free account
hub / github.com/ipython/ipython / knownfail_decorator

Function knownfail_decorator

IPython/external/decorators/_decorators.py:131–141  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected