114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | |
def test_callcapture(self): |
def func(x, y): |
print x |
print >>py.std.sys.stderr, y |
return 42 |
|
-> res, out, err = py.io.StdCaptureFD.call(func, 3, y=4) |
assert res == 42 |
assert out.startswith("3") |
assert err.startswith("4") | |