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

Method test_passes

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

Source from the content-addressed store, hash-verified

768 assert result.ret == 1
769
770 def test_passes(self, pytester: Pytester) -> None:
771 p1 = pytester.makepyfile(
772 """
773 def test_passes():
774 pass
775 class TestClass(object):
776 def test_method(self):
777 pass
778 """
779 )
780 old = p1.parent
781 pytester.chdir()
782 try:
783 result = pytester.runpytest()
784 finally:
785 os.chdir(old)
786 result.stdout.fnmatch_lines(["test_passes.py ..*", "* 2 pass*"])
787 assert result.ret == 0
788
789 def test_header_trailer_info(
790 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