TestReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)
(self, pytester: Pytester)
| 956 | assert rep.longreprtext == "" |
| 957 | |
| 958 | def test_longreprtext_skip(self, pytester: Pytester) -> None: |
| 959 | """TestReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)""" |
| 960 | reports = pytester.runitem( |
| 961 | """ |
| 962 | import pytest |
| 963 | def test_func(): |
| 964 | pytest.skip() |
| 965 | """ |
| 966 | ) |
| 967 | _, call_rep, _ = reports |
| 968 | assert isinstance(call_rep.longrepr, tuple) |
| 969 | assert "Skipped" in call_rep.longreprtext |
| 970 | |
| 971 | def test_longreprtext_collect_skip(self, pytester: Pytester) -> None: |
| 972 | """CollectReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)""" |