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

Method test_failed

testing/test_pastebin.py:18–34  ·  view source on GitHub ↗
(self, pytester: Pytester, pastebinlist)

Source from the content-addressed store, hash-verified

16 return pastebinlist
17
18 def test_failed(self, pytester: Pytester, pastebinlist) -> None:
19 testpath = pytester.makepyfile(
20 """
21 import pytest
22 def test_pass() -> None:
23 pass
24 def test_fail():
25 assert 0
26 def test_skip():
27 pytest.skip("")
28 """
29 )
30 reprec = pytester.inline_run(testpath, "--pastebin=failed")
31 assert len(pastebinlist) == 1
32 s = pastebinlist[0]
33 assert s.find("def test_fail") != -1
34 assert reprec.countoutcomes() == [1, 1, 1]
35
36 def test_all(self, pytester: Pytester, pastebinlist) -> None:
37 from _pytest.pytester import LineMatcher

Callers

nothing calls this directly

Calls 3

countoutcomesMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected