diff --git a/_pytest/capture.py b/_pytest/capture.py index c70347c11..3bab8084d 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -400,10 +400,6 @@ class EncodedFile(object): def write(self, obj): if isinstance(obj, unicode): obj = obj.encode(self.encoding) - elif isinstance(obj, str): - pass - else: - obj = str(obj) self._stream.write(obj) def writelines(self, linelist):