diff --git a/_pytest/capture.py b/_pytest/capture.py index 8bcb49377..f27ab1a74 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -240,9 +240,9 @@ class EncodedFile(object): def __getattr__(self, name): return getattr(self.buffer, name) - def __setattr__(self, dd): - """default implementation for __setattr__ because unpickling causes infinite - recursion if only __getattr__ is overloaded and __setattr__ is missing""" + def __setstate__(self, dd): + """default implementation for __setstate__ because unpickling causes infinite + recursion if only __getattr__ is overloaded and __setstate__ is missing""" self.__dict__ = dd