mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 10:11: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:
commit
5866ea8433
17
.travis.yml
17
.travis.yml
@ -5,17 +5,13 @@ python:
|
|||||||
- "3.4"
|
- "3.4"
|
||||||
- "3.3"
|
- "3.3"
|
||||||
- "2.7"
|
- "2.7"
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- fish-shell/release-2
|
|
||||||
packages:
|
packages:
|
||||||
- bash
|
- python-commandnotfound
|
||||||
- zsh
|
- python3-commandnotfound
|
||||||
- fish
|
|
||||||
- tcsh
|
|
||||||
- pandoc
|
|
||||||
- git
|
|
||||||
install:
|
install:
|
||||||
- pip install -U pip
|
- pip install -U pip
|
||||||
- pip install -U coveralls
|
- pip install -U coveralls
|
||||||
@ -24,5 +20,6 @@ install:
|
|||||||
- rm -rf build
|
- rm -rf build
|
||||||
script:
|
script:
|
||||||
- export COVERAGE_PYTHON_VERSION=python-${TRAVIS_PYTHON_VERSION:0:1}
|
- export COVERAGE_PYTHON_VERSION=python-${TRAVIS_PYTHON_VERSION:0:1}
|
||||||
- coverage run --source=thefuck,tests -m py.test -v --capture=sys
|
- coverage run --source=thefuck,tests -m py.test -v --capture=sys --enable-functional
|
||||||
after_success: coveralls
|
after_success:
|
||||||
|
- coveralls
|
||||||
|
@ -29,25 +29,25 @@ def proc(request, spawnu):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_with_confirmation(proc, TIMEOUT):
|
def test_with_confirmation(proc, TIMEOUT):
|
||||||
with_confirmation(proc, TIMEOUT)
|
with_confirmation(proc, TIMEOUT)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_select_command_with_arrows(proc, TIMEOUT):
|
def test_select_command_with_arrows(proc, TIMEOUT):
|
||||||
select_command_with_arrows(proc, TIMEOUT)
|
select_command_with_arrows(proc, TIMEOUT)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_refuse_with_confirmation(proc, TIMEOUT):
|
def test_refuse_with_confirmation(proc, TIMEOUT):
|
||||||
refuse_with_confirmation(proc, TIMEOUT)
|
refuse_with_confirmation(proc, TIMEOUT)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_without_confirmation(proc, TIMEOUT):
|
def test_without_confirmation(proc, TIMEOUT):
|
||||||
without_confirmation(proc, TIMEOUT)
|
without_confirmation(proc, TIMEOUT)
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ def plot(proc, TIMEOUT):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
@pytest.mark.benchmark(min_rounds=10)
|
@pytest.mark.benchmark(min_rounds=10)
|
||||||
def test_performance(spawnu, TIMEOUT, benchmark):
|
def test_performance(spawnu, TIMEOUT, benchmark):
|
||||||
proc = spawnu(u'thefuck/ubuntu-python3-bash-performance',
|
proc = spawnu(u'thefuck/ubuntu-python3-bash-performance',
|
||||||
|
@ -25,6 +25,7 @@ def proc(request, spawnu, run_without_docker):
|
|||||||
if not run_without_docker:
|
if not run_without_docker:
|
||||||
proc.sendline(u'pip install /src')
|
proc.sendline(u'pip install /src')
|
||||||
proc.sendline(u'tcsh')
|
proc.sendline(u'tcsh')
|
||||||
|
proc.sendline(u'setenv PYTHONIOENCODING utf8')
|
||||||
proc.sendline(u'eval `thefuck --alias`')
|
proc.sendline(u'eval `thefuck --alias`')
|
||||||
return proc
|
return proc
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ def proc(request, spawnu, run_without_docker):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_with_confirmation(proc, TIMEOUT):
|
def test_with_confirmation(proc, TIMEOUT):
|
||||||
with_confirmation(proc, TIMEOUT)
|
with_confirmation(proc, TIMEOUT)
|
||||||
history_changed(proc, TIMEOUT, u'echo test')
|
history_changed(proc, TIMEOUT, u'echo test')
|
||||||
@ -49,7 +49,7 @@ def test_select_command_with_arrows(proc, TIMEOUT):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.functional
|
@pytest.mark.functional
|
||||||
@pytest.mark.skip_without_docker
|
@pytest.mark.once_without_docker
|
||||||
def test_refuse_with_confirmation(proc, TIMEOUT):
|
def test_refuse_with_confirmation(proc, TIMEOUT):
|
||||||
refuse_with_confirmation(proc, TIMEOUT)
|
refuse_with_confirmation(proc, TIMEOUT)
|
||||||
history_not_changed(proc, TIMEOUT)
|
history_not_changed(proc, TIMEOUT)
|
||||||
|
@ -33,6 +33,8 @@ def fix_command():
|
|||||||
|
|
||||||
if selected_command:
|
if selected_command:
|
||||||
selected_command.run(command)
|
selected_command.run(command)
|
||||||
|
else:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def print_alias(entry_point=True):
|
def print_alias(entry_point=True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user