Merge pull request #3584 from jwodder/fix-3583

Fix encoding error with `print` statements in doctests
This commit is contained in:
Bruno Oliveira
2018-06-18 08:03:07 -03:00
committed by GitHub
3 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -505,7 +505,7 @@ def _fix_spoof_python2(runner, encoding):
def getvalue(self):
result = _SpoofOut.getvalue(self)
if encoding:
if encoding and isinstance(result, bytes):
result = result.decode(encoding)
return result