From 5cfd493d05b5e63a13dba011265d7cbc5b59b75f Mon Sep 17 00:00:00 2001 From: nvbn Date: Sun, 6 Sep 2015 01:24:29 +0300 Subject: [PATCH] Make "arrows" tests less dependent on environment --- tests/functional/plots.py | 4 +++- tests/functional/test_bash.py | 2 +- tests/functional/test_zsh.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/functional/plots.py b/tests/functional/plots.py index 87d49aa5..1b4d06aa 100644 --- a/tests/functional/plots.py +++ b/tests/functional/plots.py @@ -47,9 +47,11 @@ def select_command_with_arrows(proc, TIMEOUT): assert proc.expect([TIMEOUT, u'git help']) proc.send('\033[A') assert proc.expect([TIMEOUT, u'git push']) + proc.send('\033[B') + assert proc.expect([TIMEOUT, u'git help']) proc.send('\n') - assert proc.expect([TIMEOUT, u'Not a git repository']) + assert proc.expect([TIMEOUT, u'usage']) def refuse_with_confirmation(proc, TIMEOUT): diff --git a/tests/functional/test_bash.py b/tests/functional/test_bash.py index 403c64aa..a8b69ffe 100644 --- a/tests/functional/test_bash.py +++ b/tests/functional/test_bash.py @@ -40,7 +40,7 @@ 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) - history_changed(proc, TIMEOUT, u'git push') + history_changed(proc, TIMEOUT, u'git help') @pytest.mark.functional diff --git a/tests/functional/test_zsh.py b/tests/functional/test_zsh.py index 47fe82bb..1bcb77fb 100644 --- a/tests/functional/test_zsh.py +++ b/tests/functional/test_zsh.py @@ -44,7 +44,7 @@ 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) - history_changed(proc, TIMEOUT, u'git push') + history_changed(proc, TIMEOUT, u'git help') @pytest.mark.functional