MCPcopy
hub / github.com/pytest-dev/pytest / _compare_eq_text

Function _compare_eq_text

src/_pytest/assertion/compare_text.py:12–25  ·  view source on GitHub ↗
(
    left: str,
    right: str,
    highlighter: _HighlightFunc,
    verbose: int,
    assertion_text_diff_style: _AssertionTextDiffStyle,
)

Source from the content-addressed store, hash-verified

10
11
12def _compare_eq_text(
13 left: str,
14 right: str,
15 highlighter: _HighlightFunc,
16 verbose: int,
17 assertion_text_diff_style: _AssertionTextDiffStyle,
18) -> Iterator[str]:
19 match assertion_text_diff_style:
20 case "block":
21 yield from _diff_text_block(left, right)
22 case "ndiff":
23 yield from _diff_text(left, right, highlighter, verbose)
24 case unreachable:
25 assert_never(unreachable)
26
27
28def _diff_text_block(left: str, right: str) -> Iterator[str]:

Callers 2

_compare_eq_anyFunction · 0.90

Calls 3

assert_neverFunction · 0.90
_diff_text_blockFunction · 0.85
_diff_textFunction · 0.85

Tested by 1