diff --git a/tests/functional/plots.py b/tests/functional/plots.py index 131e4c3..60c68a7 100644 --- a/tests/functional/plots.py +++ b/tests/functional/plots.py @@ -20,10 +20,12 @@ def with_confirmation(proc, TIMEOUT): assert proc.expect([TIMEOUT, u'test']) -def history_changed(proc, TIMEOUT, to): +def history_changed(proc, TIMEOUT, *to): """Ensures that history changed.""" proc.send('\033[A') - assert proc.expect([TIMEOUT, to]) + pattern = [TIMEOUT] + pattern.extend(to) + assert proc.expect(pattern) def history_not_changed(proc, TIMEOUT): @@ -44,14 +46,14 @@ def select_command_with_arrows(proc, TIMEOUT): proc.send('\033[B') assert proc.expect([TIMEOUT, u'git push']) proc.send('\033[B') - assert proc.expect([TIMEOUT, u'git help']) + assert proc.expect([TIMEOUT, u'git help', u'git hook']) proc.send('\033[A') assert proc.expect([TIMEOUT, u'git push']) proc.send('\033[B') - assert proc.expect([TIMEOUT, u'git help']) + assert proc.expect([TIMEOUT, u'git help', u'git hook']) proc.send('\n') - assert proc.expect([TIMEOUT, u'usage']) + assert proc.expect([TIMEOUT, u'usage', u'fatal: not a git repository']) def refuse_with_confirmation(proc, TIMEOUT): diff --git a/tests/functional/test_bash.py b/tests/functional/test_bash.py index 7fb988e..489ca25 100644 --- a/tests/functional/test_bash.py +++ b/tests/functional/test_bash.py @@ -45,7 +45,7 @@ def test_with_confirmation(proc, TIMEOUT): @pytest.mark.functional def test_select_command_with_arrows(proc, TIMEOUT): select_command_with_arrows(proc, TIMEOUT) - history_changed(proc, TIMEOUT, u'git help') + history_changed(proc, TIMEOUT, u'git help', u'git hook') @pytest.mark.functional diff --git a/tests/functional/test_zsh.py b/tests/functional/test_zsh.py index f267e24..a6c2733 100644 --- a/tests/functional/test_zsh.py +++ b/tests/functional/test_zsh.py @@ -43,7 +43,7 @@ def test_with_confirmation(proc, TIMEOUT): @pytest.mark.functional def test_select_command_with_arrows(proc, TIMEOUT): select_command_with_arrows(proc, TIMEOUT) - history_changed(proc, TIMEOUT, u'git help') + history_changed(proc, TIMEOUT, u'git help', u'git hook') @pytest.mark.functional