MCPcopy
hub / github.com/pytest-dev/pytest / test_passes

Method test_passes

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

Source from the content-addressed store, hash-verified

875 assert result.ret == 1
876
877 def test_passes(self, pytester: Pytester) -> None:
878 p1 = pytester.makepyfile(
879 """
880 def test_passes():
881 pass
882 class TestClass(object):
883 def test_method(self):
884 pass
885 """
886 )
887 old = p1.parent
888 pytester.chdir()
889 try:
890 result = pytester.runpytest()
891 finally:
892 os.chdir(old)
893 result.stdout.fnmatch_lines(["test_passes.py ..*", "* 2 pass*"])
894 assert result.ret == 0
895
896 def test_header_trailer_info(
897 self, monkeypatch: MonkeyPatch, pytester: Pytester, request

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
chdirMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected