diff --git a/_pytest/capture.py b/_pytest/capture.py index 0b7f615bc..f48dc19fa 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -238,7 +238,8 @@ class EncodedFile(object): self.write(data) def __getattr__(self, name): - return getattr(self.buffer, name) + if name != "buffer": + return getattr(self.buffer, name) class MultiCapture(object):