summaryrefslogtreecommitdiff
path: root/tests/test_interact.py
diff options
context:
space:
mode:
authorjquast <contact@jeffquast.com>2013-09-22 19:32:33 -0700
committerjquast <contact@jeffquast.com>2013-09-22 19:32:33 -0700
commitc851a110a61f20c2163aacdf6afe210d572d777b (patch)
tree6b07f4c3638b22fe5552efe333e0397fa4d9c8fd /tests/test_interact.py
parenta83cf59505e18fd4ee0c84c4a1dd724e6f916e16 (diff)
downloadpexpect-git-c851a110a61f20c2163aacdf6afe210d572d777b.tar.gz
py2.5 compatibilities w/six.py
-except Exception as e: +except Exception, err: the unfortunate use of six.b('') instead of b'' print(arg0, arg1) => six.print_(arg0, arg1) some autopep8 -i is definitely called for, some of these test cases are darn unreadable, but did partially pep8 some of the really-long-over-80col-lines.
Diffstat (limited to 'tests/test_interact.py')
-rwxr-xr-xtests/test_interact.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_interact.py b/tests/test_interact.py
index 891265f..6754f2f 100755
--- a/tests/test_interact.py
+++ b/tests/test_interact.py
@@ -24,6 +24,7 @@ import unittest
import time, tty
import PexpectTestCase
import threading
+from pexpect import six
def start_interact (p):
p.interact()
@@ -67,12 +68,12 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase):
def test_interact (self):
p = pexpect.spawn('%s interact.py' % self.PYTHONBIN)
- p.sendline (b'Hello')
- p.sendline (b'there')
- p.sendline (b'Mr. Python')
- p.expect (b'Hello')
- p.expect (b'there')
- p.expect (b'Mr. Python')
+ p.sendline (six.b('Hello'))
+ p.sendline (six.b('there'))
+ p.sendline (six.b('Mr. Python'))
+ p.expect (six.b('Hello'))
+ p.expect (six.b('there'))
+ p.expect (six.b('Mr. Python'))
assert p.isalive() == True, p.isalive()
p.sendeof ()
p.expect (pexpect.EOF)