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

Method test_capture_and_logging

testing/test_capture.py:608–618  ·  view source on GitHub ↗

#14

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

606 assert result.ret == 2
607
608 def test_capture_and_logging(self, pytester: Pytester) -> None:
609 """#14"""
610 p = pytester.makepyfile(
611 """\
612 import logging
613 def test_log(capsys):
614 logging.error('x')
615 """
616 )
617 result = pytester.runpytest_subprocess(p)
618 assert "closed" not in result.stderr.str()
619
620 @pytest.mark.parametrize("fixture", ["capsys", "capfd"])
621 @pytest.mark.parametrize("no_capture", [True, False])

Callers

nothing calls this directly

Calls 3

strMethod · 0.80
makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected