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

Class CaptureIO

src/_pytest/capture.py:169–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168
169class CaptureIO(io.TextIOWrapper):
170 def __init__(self) -> None:
171 super().__init__(io.BytesIO(), encoding="UTF-8", newline="", write_through=True)
172
173 def getvalue(self) -> str:
174 assert isinstance(self.buffer, io.BytesIO)
175 return self.buffer.getvalue().decode("UTF-8")
176
177
178class TeeCaptureIO(CaptureIO):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected