MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_captured_large_string

Function test_captured_large_string

tests/test_iostream.py:41–49  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

39
40
41def test_captured_large_string(capsys):
42 # Make this bigger than the buffer used on the C++ side: 1024 chars
43 msg = "I've been redirected to Python, I hope!"
44 msg = msg * (1024 // len(msg) + 1)
45
46 m.captured_output_default(msg)
47 stdout, stderr = capsys.readouterr()
48 assert stdout == msg
49 assert not stderr
50
51
52def test_captured_utf8_2byte_offset0(capsys):

Callers

nothing calls this directly

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected