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

Method test_std_functional

testing/test_capture.py:433–443  ·  view source on GitHub ↗
(self, pytester: Pytester, opt)

Source from the content-addressed store, hash-verified

431class TestCaptureFixture:
432 @pytest.mark.parametrize("opt", [[], ["-s"]])
433 def test_std_functional(self, pytester: Pytester, opt) -> None:
434 reprec = pytester.inline_runsource(
435 """\
436 def test_hello(capsys):
437 print(42)
438 out, err = capsys.readouterr()
439 assert out.startswith("42")
440 """,
441 *opt,
442 )
443 reprec.assertoutcome(passed=1)
444
445 def test_capsyscapfd(self, pytester: Pytester) -> None:
446 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

assertoutcomeMethod · 0.80
inline_runsourceMethod · 0.45

Tested by

no test coverage detected