MCPcopy Create free account
hub / github.com/pytest-dev/pytest / check

Function check

testing/test_terminal.py:2276–2285  ·  view source on GitHub ↗
(msg, width, expected)

Source from the content-addressed store, hash-verified

2274 pass
2275
2276 def check(msg, width, expected):
2277 __tracebackhide__ = True
2278 if msg:
2279 rep.longrepr.reprcrash.message = msg # type: ignore
2280 actual = _get_line_with_reprcrash_message(config, rep(), width) # type: ignore
2281
2282 assert actual == expected
2283 if actual != f"{mocked_verbose_word} {mocked_pos}":
2284 assert len(actual) <= width
2285 assert wcswidth(actual) <= width
2286
2287 # AttributeError with message
2288 check(None, 80, "FAILED some::nodeid")

Callers 2

test_line_with_reprcrashFunction · 0.70
test_select_simpleMethod · 0.70

Calls 3

wcswidthFunction · 0.90
repClass · 0.70

Tested by

no test coverage detected