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

Function test_full_sequence_print_with_vv

testing/test_terminal.py:2672–2698  ·  view source on GitHub ↗

Do not truncate sequences in summaries with -vv (#11777).

(
    monkeypatch: MonkeyPatch, pytester: Pytester
)

Source from the content-addressed store, hash-verified

2670
2671
2672def test_full_sequence_print_with_vv(
2673 monkeypatch: MonkeyPatch, pytester: Pytester
2674) -> None:
2675 """Do not truncate sequences in summaries with -vv (#11777)."""
2676 monkeypatch.setattr(_pytest.terminal, "running_on_ci", lambda: False)
2677
2678 pytester.makepyfile(
2679 """
2680 def test_len_list():
2681 l = list(range(10))
2682 assert len(l) == 9
2683
2684 def test_len_dict():
2685 d = dict(zip(range(10), range(10)))
2686 assert len(d) == 9
2687 """
2688 )
2689
2690 result = pytester.runpytest("-vv")
2691 assert result.ret == 1
2692 result.stdout.fnmatch_lines(
2693 [
2694 "*short test summary info*",
2695 f"*{list(range(10))}*",
2696 f"*{dict(zip(range(10), range(10), strict=True))}*",
2697 ]
2698 )
2699
2700
2701def test_force_short_summary(monkeypatch: MonkeyPatch, pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

setattrMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…