1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-19 03:32:31 +01:00

#334: Wait only for first matched rule; regression: always show arrows

This commit is contained in:
nvbn
2015-09-01 14:34:41 +03:00
parent 5d74344994
commit 61937e9e8f
4 changed files with 8 additions and 34 deletions

View File

@@ -96,15 +96,6 @@ class TestSelectCommand(object):
require_confirmation=True)) == commands[0]
assert capsys.readouterr() == ('', u'\x1b[1K\rls [enter/↑/↓/ctrl+c]\n')
def test_with_confirmation_one_match(self, capsys, patch_getch, commands,
settings):
patch_getch(['\n'])
seq = SortedCorrectedCommandsSequence(iter([commands[0]]), settings)
assert ui.select_command(seq,
Mock(debug=False, no_color=True,
require_confirmation=True)) == commands[0]
assert capsys.readouterr() == ('', u'\x1b[1K\rls [enter/ctrl+c]\n')
def test_with_confirmation_abort(self, capsys, patch_getch, commands):
patch_getch([KeyboardInterrupt])
assert ui.select_command(commands,