summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-09-18 14:42:05 -0700
committerJeff Quast <contact@jeffquast.com>2015-09-18 14:57:29 -0700
commitbcc1700eb5e6de432285e27860898735a99e7b3e (patch)
tree5a2af947e7147df84c936546d605ed73342b8b45
parentfaff3e605b2e1d6d30d3f9ded95473ccfbb8daf0 (diff)
downloadpexpect-skip_pypy_eof.tar.gz
Only expect <eof> on non-PyPy implementations.skip_pypy_eof
I have previously encountered similar issues when sending ^C rather than ^D when the terminal should be in raw_mode with PyPy: https://github.com/jquast/blessed/blob/213c3a52a8f64ae147f4cb240a85a7f789bfff5d/blessed/tests/test_keyboard.py#L430-L432
-rwxr-xr-xtests/test_interact.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_interact.py b/tests/test_interact.py
index 86a5b7c..5bf44f9 100755
--- a/tests/test_interact.py
+++ b/tests/test_interact.py
@@ -26,6 +26,7 @@ import os
import pexpect
import unittest
import sys
+import platform
from . import PexpectTestCase
@@ -66,7 +67,8 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase):
p.sendline('')
p.expect('<out>\x1d')
p.sendcontrol('d')
- p.expect('<eof>')
+ if platform.python_implementation() != 'PyPy':
+ p.expect('<eof>')
p.expect_exact('Escaped interact')
p.expect(pexpect.EOF)
assert not p.isalive()