Skip to content

Commit 93d369e

Browse files
Merged in msabramo/pyrepl/fix_setup_test_basic_python3 (pull request #9)
testing/test_functional.py: Use sys.stdout.buffer for Python 3 instead of sys.stdout
2 parents 2fe7685 + a53f78f commit 93d369e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/test_functional.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def pytest_funcarg__child(request):
1313
except SyntaxError:
1414
pytest.skip('pexpect wont work on py3k')
1515
child = pexpect.spawn(sys.executable, ['-S'], timeout=10)
16-
child.logfile = sys.stdout
16+
if sys.version_info >= (3, ):
17+
child.logfile = sys.stdout.buffer
18+
else:
19+
child.logfile = sys.stdout
1720
child.sendline('from pyrepl.python_reader import main')
1821
child.sendline('main()')
1922
return child

0 commit comments

Comments
 (0)