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

Method test_longreprtext_skip

testing/test_runner.py:958–969  ·  view source on GitHub ↗

TestReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

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)"""

Callers

nothing calls this directly

Calls 1

runitemMethod · 0.45

Tested by

no test coverage detected