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

Method test_showlocals_short

testing/test_terminal.py:942–960  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

940 )
941
942 def test_showlocals_short(self, pytester: Pytester) -> None:
943 p1 = pytester.makepyfile(
944 """
945 def test_showlocals_short():
946 x = 3
947 y = "xxxx"
948 assert 0
949 """
950 )
951 result = pytester.runpytest(p1, "-l", "--tb=short")
952 result.stdout.fnmatch_lines(
953 [
954 "test_showlocals_short.py:*",
955 " assert 0",
956 "E assert 0",
957 " x = 3",
958 " y = 'xxxx'",
959 ]
960 )
961
962 @pytest.fixture
963 def verbose_testfile(self, pytester: Pytester) -> Path:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected