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