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

Merge pull request #524 from nvbn/fix-func-tests-on-travis-ci

Fix functional tests on travis-ci
This commit is contained in:
Vladimir Iakovlev 2016-06-28 00:38:58 +03:00 committed by GitHub
commit 5866ea8433
6 changed files with 17 additions and 17 deletions

View File

@ -5,17 +5,13 @@ python:
- "3.4"
- "3.3"
- "2.7"
services:
- docker
addons:
apt:
sources:
- fish-shell/release-2
packages:
- bash
- zsh
- fish
- tcsh
- pandoc
- git
- python-commandnotfound
- python3-commandnotfound
install:
- pip install -U pip
- pip install -U coveralls
@ -24,5 +20,6 @@ install:
- rm -rf build
script:
- export COVERAGE_PYTHON_VERSION=python-${TRAVIS_PYTHON_VERSION:0:1}
- coverage run --source=thefuck,tests -m py.test -v --capture=sys
after_success: coveralls
- coverage run --source=thefuck,tests -m py.test -v --capture=sys --enable-functional
after_success:
- coveralls

View File

@ -29,25 +29,25 @@ def proc(request, spawnu):
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_with_confirmation(proc, TIMEOUT):
with_confirmation(proc, TIMEOUT)
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_select_command_with_arrows(proc, TIMEOUT):
select_command_with_arrows(proc, TIMEOUT)
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_refuse_with_confirmation(proc, TIMEOUT):
refuse_with_confirmation(proc, TIMEOUT)
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_without_confirmation(proc, TIMEOUT):
without_confirmation(proc, TIMEOUT)

View File

@ -40,7 +40,7 @@ def plot(proc, TIMEOUT):
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
@pytest.mark.benchmark(min_rounds=10)
def test_performance(spawnu, TIMEOUT, benchmark):
proc = spawnu(u'thefuck/ubuntu-python3-bash-performance',

View File

@ -25,6 +25,7 @@ def proc(request, spawnu, run_without_docker):
if not run_without_docker:
proc.sendline(u'pip install /src')
proc.sendline(u'tcsh')
proc.sendline(u'setenv PYTHONIOENCODING utf8')
proc.sendline(u'eval `thefuck --alias`')
return proc

View File

@ -35,7 +35,7 @@ def proc(request, spawnu, run_without_docker):
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_with_confirmation(proc, TIMEOUT):
with_confirmation(proc, TIMEOUT)
history_changed(proc, TIMEOUT, u'echo test')
@ -49,7 +49,7 @@ def test_select_command_with_arrows(proc, TIMEOUT):
@pytest.mark.functional
@pytest.mark.skip_without_docker
@pytest.mark.once_without_docker
def test_refuse_with_confirmation(proc, TIMEOUT):
refuse_with_confirmation(proc, TIMEOUT)
history_not_changed(proc, TIMEOUT)

View File

@ -33,6 +33,8 @@ def fix_command():
if selected_command:
selected_command.run(command)
else:
sys.exit(1)
def print_alias(entry_point=True):