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:
Dean Moldovan
2016-09-07 00:50:10 +02:00
parent c84b37b577
commit 81511be341
11 changed files with 51 additions and 64 deletions

View File

@@ -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;
}