Author: Marc Abramowitz <[email protected]>
Branch: fix_setup_test_basic_python3
Changeset: r245:678384ba626c
Date: 2014-02-28 23:45 +0000
http://bitbucket.org/pypy/pyrepl/changeset/678384ba626c/
Log: testing/test_functional.py: Use sys.stdout.buffer for Python 3
instead of sys.stdout
because Python 3's sys.stdout takes unicode; not bytes.
diff --git a/testing/test_functional.py b/testing/test_functional.py
--- a/testing/test_functional.py
+++ b/testing/test_functional.py
@@ -13,7 +13,10 @@
except SyntaxError:
pytest.skip('pexpect wont work on py3k')
child = pexpect.spawn(sys.executable, ['-S'], timeout=10)
- child.logfile = sys.stdout
+ if sys.version_info >= (3, ):
+ child.logfile = sys.stdout.buffer
+ else:
+ child.logfile = sys.stdout
child.sendline('from pyrepl.python_reader import main')
child.sendline('main()')
return child
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit