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

Method snap

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

Source from the content-addressed store, hash-verified

450 EMPTY_BUFFER = "" # type: ignore
451
452 def snap(self):
453 self._assert_state("snap", ("started", "suspended"))
454 self.tmpfile.seek(0)
455 res = self.tmpfile.read()
456 self.tmpfile.seek(0)
457 self.tmpfile.truncate()
458 return res
459
460 def writeorg(self, data):
461 """Write to original file descriptor."""

Callers 5

test_simpleMethod · 0.95
test_stderrMethod · 0.95
test_writeorgMethod · 0.95
readouterrMethod · 0.45

Calls 2

_assert_stateMethod · 0.45
readMethod · 0.45

Tested by 4

test_simpleMethod · 0.76
test_stderrMethod · 0.76
test_writeorgMethod · 0.76