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

Function _call_reprcompare

src/_pytest/assertion/rewrite.py:490–507  ·  view source on GitHub ↗
(
    ops: Sequence[str],
    results: Sequence[bool],
    expls: Sequence[str],
    each_obj: Sequence[object],
)

Source from the content-addressed store, hash-verified

488
489
490def _call_reprcompare(
491 ops: Sequence[str],
492 results: Sequence[bool],
493 expls: Sequence[str],
494 each_obj: Sequence[object],
495) -> str:
496 for i, res, expl in zip(range(len(ops)), results, expls):
497 try:
498 done = not res
499 except Exception:
500 done = True
501 if done:
502 break
503 if util._reprcompare is not None:
504 custom = util._reprcompare(ops[i], each_obj[i], each_obj[i + 1])
505 if custom is not None:
506 return custom
507 return expl
508
509
510def _call_assertion_pass(lineno: int, orig: str, expl: str) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected