mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
Replace std::cout with py::print in tests
With this change both C++ and Python write to sys.stdout which resolves the capture issues noted in #351. Therefore, the related workarounds are removed.
This commit is contained in:
@@ -20,8 +20,8 @@ public:
|
||||
~ExampleVirt() { print_destroyed(this); }
|
||||
|
||||
virtual int run(int value) {
|
||||
std::cout << "Original implementation of ExampleVirt::run(state=" << state
|
||||
<< ", value=" << value << ")" << std::endl;
|
||||
py::print("Original implementation of "
|
||||
"ExampleVirt::run(state={}, value={})"_s.format(state, value));
|
||||
return state + value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user