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

Method snap

src/_pytest/capture.py:589–595  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

587 EMPTY_BUFFER = ""
588
589 def snap(self) -> str:
590 self._assert_state("snap", ("started", "suspended"))
591 self.tmpfile.seek(0)
592 res = self.tmpfile.read()
593 self.tmpfile.seek(0)
594 self.tmpfile.truncate()
595 return res
596
597 def writeorg(self, data: str) -> None:
598 """Write to original file descriptor."""

Callers 4

test_simpleMethod · 0.95
test_stderrMethod · 0.95
test_writeorgMethod · 0.95

Calls 4

seekMethod · 0.80
truncateMethod · 0.80
_assert_stateMethod · 0.45
readMethod · 0.45

Tested by 4

test_simpleMethod · 0.76
test_stderrMethod · 0.76
test_writeorgMethod · 0.76