diff --git a/.travis.yml b/.travis.yml index 1c3e0664..c4b71bbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/functional/test_fish.py b/tests/functional/test_fish.py index eb02f053..ce7e01e6 100644 --- a/tests/functional/test_fish.py +++ b/tests/functional/test_fish.py @@ -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) diff --git a/tests/functional/test_performance.py b/tests/functional/test_performance.py index c9b69357..f0917ecc 100644 --- a/tests/functional/test_performance.py +++ b/tests/functional/test_performance.py @@ -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', diff --git a/tests/functional/test_tcsh.py b/tests/functional/test_tcsh.py index 5632370a..c5cc5a66 100644 --- a/tests/functional/test_tcsh.py +++ b/tests/functional/test_tcsh.py @@ -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 diff --git a/tests/functional/test_zsh.py b/tests/functional/test_zsh.py index 68457bdf..c0df1f09 100644 --- a/tests/functional/test_zsh.py +++ b/tests/functional/test_zsh.py @@ -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) diff --git a/thefuck/main.py b/thefuck/main.py index 506a1a06..7a9c371e 100644 --- a/thefuck/main.py +++ b/thefuck/main.py @@ -33,6 +33,8 @@ def fix_command(): if selected_command: selected_command.run(command) + else: + sys.exit(1) def print_alias(entry_point=True):