mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
#524: Wait for prompt in zsh tests
This commit is contained in:
parent
e2f66cb26b
commit
2bf21d9f0e
@ -34,10 +34,15 @@ def proc(request, spawnu, run_without_docker):
|
||||
return proc
|
||||
|
||||
|
||||
def wait_prompt(proc, TIMEOUT):
|
||||
assert proc.expect([TIMEOUT, u'#'])
|
||||
|
||||
|
||||
@pytest.mark.functional
|
||||
@pytest.mark.skip_without_docker
|
||||
@pytest.mark.once_without_docker
|
||||
def test_with_confirmation(proc, TIMEOUT):
|
||||
with_confirmation(proc, TIMEOUT)
|
||||
wait_prompt(proc, TIMEOUT)
|
||||
history_changed(proc, TIMEOUT, u'echo test')
|
||||
|
||||
|
||||
@ -45,13 +50,15 @@ def test_with_confirmation(proc, TIMEOUT):
|
||||
@pytest.mark.once_without_docker
|
||||
def test_select_command_with_arrows(proc, TIMEOUT):
|
||||
select_command_with_arrows(proc, TIMEOUT)
|
||||
wait_prompt(proc, TIMEOUT)
|
||||
history_changed(proc, TIMEOUT, u'git help')
|
||||
|
||||
|
||||
@pytest.mark.functional
|
||||
@pytest.mark.skip_without_docker
|
||||
@pytest.mark.once_without_docker
|
||||
def test_refuse_with_confirmation(proc, TIMEOUT):
|
||||
refuse_with_confirmation(proc, TIMEOUT)
|
||||
wait_prompt(proc, TIMEOUT)
|
||||
history_not_changed(proc, TIMEOUT)
|
||||
|
||||
|
||||
@ -59,6 +66,7 @@ def test_refuse_with_confirmation(proc, TIMEOUT):
|
||||
@pytest.mark.once_without_docker
|
||||
def test_without_confirmation(proc, TIMEOUT):
|
||||
without_confirmation(proc, TIMEOUT)
|
||||
wait_prompt(proc, TIMEOUT)
|
||||
history_changed(proc, TIMEOUT, u'echo test')
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user