Various updates to tests

This commit is contained in:
Brian May 2018-03-16 18:27:50 +11:00
parent 74acc10385
commit 11455d0bcd
3 changed files with 10 additions and 6 deletions

View File

@ -4,16 +4,17 @@ python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
install:
- travis_retry pip install -q flake8 pytest mock
- travis_retry pip install -q -r requirements-tests.txt
before_script:
# stop the build if there are Python syntax errors or undefined names.
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics; fi
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then flake8 sshuttle --count --select=E901,E999,F821,F822,F823 --show-source --statistics; fi
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide.
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics; fi
- if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then flake8 sshuttle --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics; fi
script:
- PYTHONPATH=. py.test

View File

@ -1,3 +1,4 @@
-r requirements.txt
pytest==3.4.2
mock==2.0.0
flake8==3.5.0

View File

@ -5,6 +5,7 @@ envlist =
py27,
py34,
py35,
py36,
[testenv]
basepython =
@ -12,9 +13,10 @@ basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
commands =
flake8 sshuttle --count --select=E901,E999,F821,F822,F823 --show-source --statistics
flake8 sshuttle --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
py.test
deps =
pytest
mock
setuptools>=17.1
-rrequirements-tests.txt