Do not truncate sequences in summaries with -vv (#11777).
(
monkeypatch: MonkeyPatch, pytester: Pytester
)
| 2670 | |
| 2671 | |
| 2672 | def 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 | |
| 2701 | def test_force_short_summary(monkeypatch: MonkeyPatch, pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…