httpie/http-prompt

pexpect: test failed on pypy3

Open

#32 ouverte le 30 mai 2016

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Python (364 forks)batch import
help wanted

Métriques du dépôt

Stars
 (8 836 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Not sure why. test_interaction() in tests/test_interaction.py is failing on pypy3 on Travis CI:

=================================== FAILURES ===================================
_______________________________ test_interaction _______________________________
    @pytest.mark.skipif(sys.platform == 'win32',
                        reason="pexpect doesn't work well on Windows")
    @pytest.mark.slow
    def test_interaction():
        bin_path = get_http_prompt_path()
        child = pexpect.spawn(bin_path)

        # TODO: Test more interaction

        child.sendline('exit')
>       child.expect_exact('Goodbye!', timeout=20)
tests/test_interaction.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../virtualenv/pypy3-2.4.0/site-packages/pexpect/spawnbase.py:390: in expect_exact
    return exp.expect_loop(timeout)
../../../virtualenv/pypy3-2.4.0/site-packages/pexpect/expect.py:107: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pexpect.expect.Expecter object at 0x0000000004e456e0>
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)
            msg += '\nsearcher: %s' % self.searcher
            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 0x0000000004e45248>
E           command: /home/travis/virtualenv/pypy3-2.4.0/bin/http-prompt
E           args: ['/home/travis/virtualenv/pypy3-2.4.0/bin/http-prompt']
E           buffer (last 100 chars): b'exit\r\nVersion: 0.2.0\r\n'
E           before (last 100 chars): b'exit\r\nVersion: 0.2.0\r\n'
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 2532
E           child_fd: 11
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
E           searcher: searcher_string:
E               0: "b'Goodbye!'"
../../../virtualenv/pypy3-2.4.0/site-packages/pexpect/expect.py:70: TIMEOUT

See full log at https://travis-ci.org/eliangcs/http-prompt/jobs/133855030.

Guide contributeur