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

Function test_capture_badoutput_issue412

testing/test_capture.py:773–792  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

771
772
773def test_capture_badoutput_issue412(pytester: Pytester) -> None:
774 pytester.makepyfile(
775 """
776 import os
777
778 def test_func():
779 omg = bytearray([1,129,1])
780 os.write(1, omg)
781 assert 0
782 """
783 )
784 result = pytester.runpytest("--capture=fd")
785 result.stdout.fnmatch_lines(
786 """
787 *def test_func*
788 *assert 0*
789 *Captured*
790 *1 failed*
791 """
792 )
793
794
795def test_capture_early_option_parsing(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected