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

Method test_simple_only_fd

testing/test_capture.py:1201–1217  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1199 captureclass = staticmethod(StdCaptureFD)
1200
1201 def test_simple_only_fd(self, pytester: Pytester) -> None:
1202 pytester.makepyfile(
1203 """\
1204 import os
1205 def test_x():
1206 os.write(1, b"hello\\n")
1207 assert 0
1208 """
1209 )
1210 result = pytester.runpytest_subprocess()
1211 result.stdout.fnmatch_lines(
1212 """
1213 *test_x*
1214 *assert 0*
1215 *Captured stdout*
1216 """
1217 )
1218
1219 def test_intermingling(self):
1220 with self.getcapture() as cap:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected