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

TestCaseCanon.test_beyond_max_icanon failes #283

Closed
jlec opened this issue Oct 10, 2015 · 1 comment
Closed

TestCaseCanon.test_beyond_max_icanon failes #283

jlec opened this issue Oct 10, 2015 · 1 comment

Comments

@jlec
Copy link

jlec commented Oct 10, 2015

========================================= test session starts ==========================================
platform linux -- Python 3.4.3, pytest-2.8.1, py-1.4.30, pluggy-0.3.1
rootdir: /var/tmp/portage/dev-python/pexpect-4.0.1/work/pexpect-4.0.1, inifile: setup.cfg
collected 3 items

tests/test_maxcanon.py F..

=============================================== FAILURES ===============================================
_________________________________ TestCaseCanon.test_beyond_max_icanon _________________________________

self = <tests.test_maxcanon.TestCaseCanon testMethod=test_beyond_max_icanon>

    @pytest.mark.skipif(
        sys.platform.lower().startswith('freebsd'),
        reason='os.write to BLOCK indefinitely on FreeBSD in this case'
    )
    def test_beyond_max_icanon(self):
        " a single BEL is sent when maximum bytes is reached. "
        # given,
        child = pexpect.spawn('bash', echo=self.echo, timeout=5)
        child.sendline('stty icanon imaxbel erase ^H')
        child.sendline('cat')
        send_bytes = self.max_input

        # exercise,
        child.sendline('_' * send_bytes)
>       child.expect_exact('\a')

tests/test_maxcanon.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pexpect/spawnbase.py:384: in expect_exact
    return exp.expect_loop(timeout)
pexpect/expect.py:104: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pexpect.expect.Expecter object at 0x7f9edda6eb00>, err = TIMEOUT('Timeout exceeded.',)

    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: Timeout exceeded.
E           <pexpect.pty_spawn.spawn object at 0x7f9edda6e860>
E           command: /bin/bash
E           args: ['/bin/bash']
E           searcher: None
E           buffer (last 100 chars): b'__________________________________________________________________________________________________\r\n'
E           before (last 100 chars): b'__________________________________________________________________________________________________\r\n'
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 31124
E           child_fd: 12
E           closed: False
E           timeout: 5
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_maxcanon.TestCaseCanon.test_beyond_max_icanon
================================== 1 failed, 2 passed in 8.57 seconds ==================================

pexpect-4.0.1 and py3.4

@jquast
Copy link
Member

jquast commented Oct 10, 2015

This test case removed recently in PR #279 thanks!

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