def test_capturing_reset_simple(self):
cap = self.getcapture()
print "hello world"
print >>sys.stderr, "hello error"
-> out, err = cap.reset()
assert out == "hello world\n"
assert err == "hello error\n"
def reset(self):
""" return captured output as strings and restore sys.stdout/err."""
-> x, y = self.done()
return x.read(), y.read()