summaryrefslogtreecommitdiff
path: root/tests/test_ctrl_chars.py
diff options
context:
space:
mode:
authorjquast <contact@jeffquast.com>2014-05-25 09:20:33 -0700
committerjquast <contact@jeffquast.com>2014-05-25 09:20:33 -0700
commite4d63327d2d4890b1ef549f87f0a137e6fa7eb94 (patch)
treebccb3f0614ea282a63e5d57886d02ea95d961ab7 /tests/test_ctrl_chars.py
parent78b16ad8f06ce20b5274a7a7c17f3a8a042edd46 (diff)
downloadpexpect-issue-20-try-2.tar.gz
more naughty attempts, cleaning up, as not to loseissue-20-try-2
Diffstat (limited to 'tests/test_ctrl_chars.py')
-rwxr-xr-xtests/test_ctrl_chars.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_ctrl_chars.py b/tests/test_ctrl_chars.py
index 336337c..9def111 100755
--- a/tests/test_ctrl_chars.py
+++ b/tests/test_ctrl_chars.py
@@ -39,12 +39,15 @@ class TestCtrlChars(PexpectTestCase.PexpectTestCase):
process.'''
child = pexpect.spawn('python getch.py')
child.expect('READY', timeout=5)
+ i = None
try:
- for i in range(1,256):
+ for i in range(1, 256):
child.send(byte(i))
- child.expect ('%d\r\n' % (i,))
# This needs to be last, as getch.py exits on \x00
child.send(byte(0))
+
+ for i in range(1, 256):
+ child.expect('%d\r\n' % (i,))
child.expect('0\r\n')
child.expect(pexpect.EOF)
except Exception: