1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 06:34:09 +00:00

Minor refactoring

This commit is contained in:
nvbn
2015-09-08 15:24:49 +03:00
parent 1173f9f59c
commit b8ce95ad68
8 changed files with 36 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
import pytest
from thefuck.main import _get_current_version
from thefuck.utils import get_installation_info
envs = ((u'bash', 'thefuck/ubuntu-bash', u'''
FROM ubuntu:latest
@@ -18,7 +18,8 @@ def test_installation(spawnu, shell, TIMEOUT, tag, dockerfile):
proc = spawnu(tag, dockerfile, shell)
proc.sendline(u'cat /src/install.sh | sh - && $0')
proc.sendline(u'thefuck --version')
assert proc.expect([TIMEOUT, u'thefuck {}'.format(_get_current_version())],
version = get_installation_info().version
assert proc.expect([TIMEOUT, u'thefuck {}'.format(version)],
timeout=600)
proc.sendline(u'fuck')
assert proc.expect([TIMEOUT, u'No fucks given'])