From b2a500911693a1bc61d1cf701954152c7cd69627 Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Sat, 13 Aug 2016 14:50:21 +0300 Subject: [PATCH] #N/A: Ensure that thefuck successfully installed in functional tests --- tests/functional/test_bash.py | 3 ++- tests/functional/test_fish.py | 3 ++- tests/functional/test_tcsh.py | 3 ++- tests/functional/test_zsh.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_bash.py b/tests/functional/test_bash.py index 5ce8ba8..45496d1 100644 --- a/tests/functional/test_bash.py +++ b/tests/functional/test_bash.py @@ -19,9 +19,10 @@ containers = ((u'thefuck/ubuntu-python3-bash', @pytest.fixture(params=containers) -def proc(request, spawnu): +def proc(request, spawnu, TIMEOUT): proc = spawnu(*request.param) proc.sendline(u"pip install /src") + assert proc.expect([TIMEOUT, u'Successfully installed']) proc.sendline(u"export PS1='$ '") proc.sendline(u'eval $(thefuck --alias)') proc.sendline(u'echo > $HISTFILE') diff --git a/tests/functional/test_fish.py b/tests/functional/test_fish.py index 5436180..aec038a 100644 --- a/tests/functional/test_fish.py +++ b/tests/functional/test_fish.py @@ -20,9 +20,10 @@ containers = (('thefuck/ubuntu-python3-fish', @pytest.fixture(params=containers) -def proc(request, spawnu): +def proc(request, spawnu, TIMEOUT): proc = spawnu(*request.param) proc.sendline(u"pip install /src") + assert proc.expect([TIMEOUT, u'Successfully installed']) proc.sendline(u'thefuck --alias > ~/.config/fish/config.fish') proc.sendline(u'fish') return proc diff --git a/tests/functional/test_tcsh.py b/tests/functional/test_tcsh.py index 4273f53..e7d621b 100644 --- a/tests/functional/test_tcsh.py +++ b/tests/functional/test_tcsh.py @@ -20,9 +20,10 @@ containers = (('thefuck/ubuntu-python3-tcsh', @pytest.fixture(params=containers) -def proc(request, spawnu): +def proc(request, spawnu, TIMEOUT): proc = spawnu(*request.param) proc.sendline(u'pip install /src') + assert proc.expect([TIMEOUT, u'Successfully installed']) proc.sendline(u'tcsh') proc.sendline(u'setenv PYTHONIOENCODING utf8') proc.sendline(u'eval `thefuck --alias`') diff --git a/tests/functional/test_zsh.py b/tests/functional/test_zsh.py index 0a6540a..6c12a3d 100644 --- a/tests/functional/test_zsh.py +++ b/tests/functional/test_zsh.py @@ -21,9 +21,10 @@ containers = (('thefuck/ubuntu-python3-zsh', @pytest.fixture(params=containers) -def proc(request, spawnu): +def proc(request, spawnu, TIMEOUT): proc = spawnu(*request.param) proc.sendline(u'pip install /src') + assert proc.expect([TIMEOUT, u'Successfully installed']) proc.sendline(u'eval $(thefuck --alias)') proc.sendline(u'export HISTFILE=~/.zsh_history') proc.sendline(u'echo > $HISTFILE')