summaryrefslogtreecommitdiff
path: root/tests/test_interact.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-09-26 13:28:05 -0700
committerThomas Kluyver <takowl@gmail.com>2013-09-26 13:28:27 -0700
commitae3927e16e6c6227766ae76afeb129ac6f603c07 (patch)
tree506021d4c12430dc8b53fb3c6dc96d9bd8558ae3 /tests/test_interact.py
parent41ef7a7b0b5d049fc88cbde47da76398f4c172c7 (diff)
downloadpexpect-git-ae3927e16e6c6227766ae76afeb129ac6f603c07.tar.gz
Make tests for interact more robust on slow machines
Diffstat (limited to 'tests/test_interact.py')
-rwxr-xr-xtests/test_interact.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_interact.py b/tests/test_interact.py
index 022fc63..d3416dd 100755
--- a/tests/test_interact.py
+++ b/tests/test_interact.py
@@ -30,12 +30,13 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase):
def test_interact (self):
p = pexpect.spawn(str('%s interact.py' % (self.PYTHONBIN,)))
+ p.expect('<in >')
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.expect (b'<out>Hello')
+ p.expect (b'<out>there')
+ p.expect (b'<out>Mr. Python')
assert p.isalive()
p.sendeof ()
p.expect (pexpect.EOF)
@@ -45,12 +46,13 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase):
def test_interact_unicode (self):
p = pexpect.spawnu(str('%s interact_unicode.py' % (self.PYTHONBIN,)))
try:
+ p.expect('<in >')
p.sendline ('Hello')
p.sendline ('theré')
p.sendline ('Mr. Pyþon')
- p.expect ('Hello')
- p.expect ('theré')
- p.expect ('Mr. Pyþon')
+ p.expect ('<out>Hello')
+ p.expect ('<out>theré')
+ p.expect ('<out>Mr. Pyþon')
assert p.isalive()
p.sendeof ()
p.expect (pexpect.EOF)