MCPcopy Index your code
hub / github.com/RustPython/RustPython / skip

Function skip

Lib/unittest/case.py:162–180  ·  view source on GitHub ↗

Unconditionally skip a test.

(reason)

Source from the content-addressed store, hash-verified

160
161
162def skip(reason):
163 """
164 Unconditionally skip a test.
165 """
166 def decorator(test_item):
167 if not isinstance(test_item, type):
168 @functools.wraps(test_item)
169 def skip_wrapper(*args, **kwargs):
170 raise SkipTest(reason)
171 test_item = skip_wrapper
172
173 test_item.__unittest_skip__ = True
174 test_item.__unittest_skip_why__ = reason
175 return test_item
176 if isinstance(reason, types.FunctionType):
177 test_item = reason
178 reason = ''
179 return decorator(test_item)
180 return decorator
181
182def skipIf(condition, reason):
183 """

Callers 8

skipIfFunction · 0.85
skipUnlessFunction · 0.85
create_cursorMethod · 0.85
adjust_cursorMethod · 0.85
searchMethod · 0.85
search_info_literalFunction · 0.85
skip_charMethod · 0.85
getattroMethod · 0.85

Calls 2

isinstanceFunction · 0.85
decoratorFunction · 0.70

Tested by

no test coverage detected