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

Function tmpfile

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

Source from the content-addressed store, hash-verified

932
933@pytest.fixture
934def tmpfile(pytester: Pytester) -> Generator[BinaryIO, None, None]:
935 f = pytester.makepyfile("").open("wb+")
936 yield f
937 if not f.closed:
938 f.close()
939
940
941@contextlib.contextmanager

Callers

nothing calls this directly

Calls 2

makepyfileMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected