Merge branch 'master' into features

This commit is contained in:
Bruno Oliveira
2017-07-20 22:10:58 -03:00
4 changed files with 22 additions and 2 deletions

View File

@@ -282,7 +282,15 @@ def _setup_collect_fakemodule():
if _PY2:
from py.io import TextIO as CaptureIO
# Without this the test_dupfile_on_textio will fail, otherwise CaptureIO could directly inherit from StringIO.
from py.io import TextIO
class CaptureIO(TextIO):
@property
def encoding(self):
return getattr(self, '_encoding', 'UTF-8')
else:
import io