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

Function test_close_and_capture_again

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

Source from the content-addressed store, hash-verified

1351
1352
1353def test_close_and_capture_again(pytester: Pytester) -> None:
1354 pytester.makepyfile(
1355 """
1356 import os
1357 def test_close():
1358 os.close(1)
1359 def test_capture_again():
1360 os.write(1, b"hello\\n")
1361 assert 0
1362 """
1363 )
1364 result = pytester.runpytest_subprocess()
1365 result.stdout.fnmatch_lines(
1366 """
1367 *test_capture_again*
1368 *assert 0*
1369 *stdout*
1370 *hello*
1371 """
1372 )
1373
1374
1375@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected