Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncTests.test_expect_exact fails #284

Closed
jlec opened this issue Oct 10, 2015 · 2 comments
Closed

AsyncTests.test_expect_exact fails #284

jlec opened this issue Oct 10, 2015 · 2 comments

Comments

@jlec
Copy link

jlec commented Oct 10, 2015

=============================================== FAILURES ===============================================
_____________________________________ AsyncTests.test_expect_exact _____________________________________

self = <tests.test_async.AsyncTests testMethod=test_expect_exact>

    def test_expect_exact(self):
        p = pexpect.spawn('%s list100.py' % sys.executable)
        assert run(p.expect_exact(b'5', async=True)) == 0
        assert run(p.expect_exact(['wpeok', b'11'], async=True)) == 1
>       assert run(p.expect_exact([b'foo', pexpect.EOF], async=True)) == 1

tests/test_async.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_async.py:13: in run
    return asyncio.get_event_loop().run_until_complete(coro)
/usr/lib64/python3.4/asyncio/base_events.py:316: in run_until_complete
    return future.result()
/usr/lib64/python3.4/asyncio/futures.py:275: in result
    raise self._exception
/usr/lib64/python3.4/asyncio/tasks.py:238: in _step
    result = next(coro)
pexpect/async.py:23: in expect_async
    return expecter.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pexpect.expect.Expecter object at 0x7fb8d8cc2390>, err = TimeoutError()

    def timeout(self, err=None):
        spawn = self.spawn
        from . import TIMEOUT

        spawn.before = spawn.buffer
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            if err is not None:
                msg = str(err) + '\n' + msg
>           raise TIMEOUT(msg)
E           pexpect.exceptions.TIMEOUT:
E           <pexpect.pty_spawn.spawn object at 0x7fb8d8a4ab70>
E           command: /usr/bin/python3.4
E           args: ['/usr/bin/python3.4', 'list100.py']
E           searcher: None
E           buffer (last 100 chars): b'5, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\r\n'
E           before (last 100 chars): b'5, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\r\n'
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 8938
E           child_fd: -1
E           closed: False
E           timeout: 30
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: None
E           logfile_read: None
E           logfile_send: None
E           maxread: 2000
E           ignorecase: False
E           searchwindowsize: None
E           delaybeforesend: 0.05
E           delayafterclose: 0.1
E           delayafterterminate: 0.1

pexpect/expect.py:68: TIMEOUT
----------------------------------------- Captured stdout call -----------------------------------------

 tests.test_async.AsyncTests.test_expect_exact
================================ 1 failed, 178 passed in 149.86 seconds ================================

with pexpect-4.0.1 and py-3.4

@jquast
Copy link
Member

jquast commented Oct 10, 2015

Thank you again, very grateful for the report -- This is a duplicate of #213 however.

@jquast
Copy link
Member

jquast commented Oct 13, 2015

And now also closed by #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants