Skip to content

Commit 39259a7

Browse files
committed
Merge from default to msabramo/improve_test_readline
2 parents 5d39636 + a9a9f96 commit 39259a7

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ build/
33
.cache/
44
\.tox/
55
.*\.egg-info
6+
\.pyc
7+
\.swp

pyrepl/unix_eventqueue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def insert(self, event):
100100
self.events.append(event)
101101

102102
def push(self, char):
103-
self.buf.append(ord(char))
103+
ord_char = char if isinstance(char, int) else ord(char)
104+
self.buf.append(ord_char)
104105
if char in self.k:
105106
if self.k is self.ck:
106107
#sanity check, buffer is empty when a special key comes

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

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist= py27, py32
2+
envlist = py26, py27, pypy, py33
33

44
[pytest]
55
codechecks = pep8 pyflakes

0 commit comments

Comments
 (0)