MCPcopy
hub / github.com/pytest-dev/pytest / tmpfile

Function tmpfile

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

Source from the content-addressed store, hash-verified

1006
1007@pytest.fixture
1008def tmpfile(pytester: Pytester) -> Generator[BinaryIO]:
1009 f = pytester.makepyfile("").open("wb+")
1010 yield f
1011 if not f.closed:
1012 f.close()
1013
1014
1015@contextlib.contextmanager

Callers

nothing calls this directly

Calls 3

openMethod · 0.80
makepyfileMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…