Author: Ronny Pfannschmidt <[email protected]>
Branch: py3k-readline
Changeset: r219:37149e9029f6
Date: 2013-01-15 22:16 +0100
http://bitbucket.org/pypy/pyrepl/changeset/37149e9029f6/
Log: fix some minimal problems
diff --git a/testing/test_readline.py b/testing/test_readline.py
--- a/testing/test_readline.py
+++ b/testing/test_readline.py
@@ -1,11 +1,13 @@
from pyrepl.readline import _ReadlineWrapper
-import os, pty
+import os
+import pty
+
def test_raw_input():
readline_wrapper = _ReadlineWrapper()
master, slave = pty.openpty()
readline_wrapper.f_in = slave
- os.write(master, 'input\n')
+ os.write(master, b'input\n')
result = readline_wrapper.raw_input('prompt:')
assert result == 'input'
# A bytes string on python2, a unicode string on python3.
diff --git a/testing/test_unix_reader.py b/testing/test_unix_reader.py
--- a/testing/test_unix_reader.py
+++ b/testing/test_unix_reader.py
@@ -7,7 +7,7 @@
def test_simple():
q = EncodedQueue({}, 'utf-8')
- a = u'\u1234'
+ a = b'\u1234'.decode('unicode-escape')
b = a.encode('utf-8')
for c in b:
q.push(c)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit