mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix detail::pythonbuf::overflow()'s return value to return not_eof(c) (#1479)
This commit is contained in:
committed by
Wenzel Jakob
parent
3789b4f9fd
commit
2cbafb057f
@@ -53,6 +53,16 @@ def test_captured(capsys):
|
||||
assert stdout == ''
|
||||
assert stderr == msg
|
||||
|
||||
def test_captured_large_string(capsys):
|
||||
# Make this bigger than the buffer used on the C++ side: 1024 chars
|
||||
msg = "I've been redirected to Python, I hope!"
|
||||
msg = msg * (1024 // len(msg) + 1)
|
||||
|
||||
m.captured_output_default(msg)
|
||||
stdout, stderr = capsys.readouterr()
|
||||
assert stdout == msg
|
||||
assert stderr == ''
|
||||
|
||||
|
||||
def test_guard_capture(capsys):
|
||||
msg = "I've been redirected to Python, I hope!"
|
||||
|
||||
Reference in New Issue
Block a user