| 139 |
| 140 |
| 141 |
| 142 |
| 143 |
| 144 |
| 145 |
| 146 |
| 147 |
| 148 |
| 149 |
| 150 | |
def test_callcapture_nofd(): |
def func(x, y): |
os.write(1, "hello") |
os.write(2, "hello") |
print x |
print >>py.std.sys.stderr, y |
return 42 |
|
-> res, out, err = py.io.StdCapture.call(func, 3, y=4) |
assert res == 42 |
assert out.startswith("3") |
assert err.startswith("4") | |