def test_capturing_twice_error(self):
-> cap = self.getcapture()
print "hello"
cap.reset()
py.test.raises(EnvironmentError, "cap.reset()")
def getcapture(self, **kw):
-> return py.io.StdCaptureFD(**kw)