summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_misc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py
index 118de2e..6052b6a 100755
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -87,6 +87,12 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
remaining = child.read().replace(_CAT_EOF, b'')
self.assertEqual(remaining, b'abc\r\n')
+ def test_read_poll_timeout(self):
+ " Test use_poll properly times out "
+ child = pexpect.spawn('sleep 5', use_poll=True)
+ with self.assertRaises(pexpect.TIMEOUT):
+ child.expect(pexpect.EOF, timeout=1)
+
def test_readline_bin_echo(self):
" Test spawn('echo'). "
# given,