diff --git a/.travis.yml b/.travis.yml index 2d67be87..b64bbdcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,9 @@ before_install: - python --version - python -m pip install --upgrade pip - pip install black pytest pytest-xdist - - rm -rf /home/travis/.cache/textattack install: - pip install -e . script: - black . --check - - travis_wait 20 pytest tests -vx --dist=loadfile -n auto + # Run the non-slow tests. (Slow tests run on Jenkins.) + - pytest tests -vx --dist=loadfile -n auto -k-slow diff --git a/pytest.ini b/pytest.ini index 4ef9a406..4585a505 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,5 @@ [pytest] addopts = -ra testpaths = tests +markers = + slow: a test that takes >60s to run. we don't run these on travis. diff --git a/tests/test_command_line.py b/tests/test_command_line.py index 986e761b..7871666b 100644 --- a/tests/test_command_line.py +++ b/tests/test_command_line.py @@ -124,6 +124,7 @@ attack_test_params = [ @pytest.mark.parametrize("name, command, sample_output_file", attack_test_params) +@pytest.mark.slow def test_command_line_attack(capsys, name, command, sample_output_file): """ Runs attack tests and compares their outputs to a reference file. """