1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-19 04:21:14 +00:00
thefuck/tests/functional/test_fish.py

37 lines
967 B
Python
Raw Normal View History

2015-07-24 08:04:49 +03:00
import pytest
2015-07-24 23:14:58 +03:00
from tests.functional.plots import with_confirmation, without_confirmation, \
2015-07-30 18:28:20 +03:00
refuse_with_confirmation, select_command_with_arrows
containers = ((u'thefuck/python3', u'', u'fish'),
(u'thefuck/python2', u'', u'fish'))
2015-07-24 08:04:49 +03:00
2015-07-29 16:30:32 +03:00
@pytest.fixture(params=containers)
def proc(request, spawnu, TIMEOUT):
proc = spawnu(*request.param)
2015-09-01 18:36:25 +03:00
proc.sendline(u'thefuck --alias > ~/.config/fish/config.fish')
2015-07-29 16:30:32 +03:00
proc.sendline(u'fish')
return proc
2015-09-06 01:13:44 +03:00
@pytest.mark.functional
def test_with_confirmation(proc, TIMEOUT):
with_confirmation(proc, TIMEOUT)
2015-07-24 08:04:49 +03:00
2015-09-06 01:13:44 +03:00
@pytest.mark.functional
def test_select_command_with_arrows(proc, TIMEOUT):
select_command_with_arrows(proc, TIMEOUT)
2015-07-30 18:28:20 +03:00
2015-09-06 01:13:44 +03:00
@pytest.mark.functional
def test_refuse_with_confirmation(proc, TIMEOUT):
refuse_with_confirmation(proc, TIMEOUT)
2015-07-24 23:14:58 +03:00
2015-09-06 01:13:44 +03:00
@pytest.mark.functional
def test_without_confirmation(proc, TIMEOUT):
without_confirmation(proc, TIMEOUT)
# TODO: ensure that history changes.