Author: Marc Abramowitz <[email protected]>
Branch: msabramo/improve_test_readline
Changeset: r255:2573268feedc
Date: 2014-03-09 16:26 +0000
http://bitbucket.org/pypy/pyrepl/changeset/2573268feedc/
Log: Merge from default to msabramo/improve_test_readline
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -3,3 +3,5 @@
.cache/
\.tox/
.*\.egg-info
+\.pyc
+\.swp
diff --git a/pyrepl/unix_eventqueue.py b/pyrepl/unix_eventqueue.py
--- a/pyrepl/unix_eventqueue.py
+++ b/pyrepl/unix_eventqueue.py
@@ -100,7 +100,8 @@
self.events.append(event)
def push(self, char):
- self.buf.append(ord(char))
+ ord_char = char if isinstance(char, int) else ord(char)
+ self.buf.append(ord_char)
if char in self.k:
if self.k is self.ck:
#sanity check, buffer is empty when a special key comes
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
diff --git a/tox.ini b/tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist= py27, py32
+envlist = py26, py27, pypy, py33
[pytest]
codechecks = pep8 pyflakes
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit