network/tox.ini
2018-05-17 12:23:31 +02:00

117 lines
2.2 KiB
INI

[tox]
envlist = flake8, pylint, py{26,27,36,37}
skipsdist = true
skip_missing_interpreters = True
[testenv]
basepython = python2.7
deps =
py{26,27,36,37}: pytest-cov
py{27,36,37}: pytest>=3.5.1
py26: pytest
[base]
passenv = *
setenv =
PYTHONPATH = {toxinidir}/src
LC_ALL = C
changedir = {toxinidir}/tests
covtarget = network_connections
pytesttarget = .
[testenv:py26]
passenv = {[base]passenv}
setenv =
{[base]setenv}
hangedir = {[base]changedir}
basepython = python2.6
commands =
pytest \
--durations=5 \
--cov={[base]covtarget} \
--cov-report=html:htmlcov-py26 --cov-report=term \
{posargs} \
{[base]pytesttarget}
[testenv:py27]
passenv = {[base]passenv}
setenv =
{[base]setenv}
changedir = {[base]changedir}
basepython = python2.7
commands =
pytest \
--durations=5 \
--cov={[base]covtarget} \
--cov-report=html:htmlcov-py27 --cov-report=term \
{posargs} \
{[base]pytesttarget}
[testenv:py36]
passenv = {[base]passenv}
setenv =
{[base]setenv}
changedir = {[base]changedir}
basepython = python3.6
commands =
pytest \
--durations=5 \
--cov={[base]covtarget} \
--cov-report=html:htmlcov-py36 --cov-report=term \
{posargs} \
{[base]pytesttarget}
[testenv:py37]
passenv = {[base]passenv}
setenv =
{[base]setenv}
changedir = {[base]changedir}
basepython = python3.7
commands =
pytest \
--durations=5 \
--cov={[base]covtarget} \
--cov-report=html:htmlcov-py37 --cov-report=term \
{posargs} \
{[base]pytesttarget}
[testenv:pylint]
setenv =
{[base]setenv}
deps =
pylint>=1.8.4
commands =
pylint \
--errors-only \
{posargs} \
library/network_connections.py \
tests/test_network_connections.py
[testenv:flake8]
deps =
flake8>=3.5
whitelist_externals = flake8
commands=
flake8 --statistics {posargs} \
.
[testenv:coveralls]
passenv = TRAVIS TRAVIS_*
deps =
coveralls
changedir = {[base]changedir}
commands =
coveralls
[pytest]
addopts = -rxs
[flake8]
show_source = True
[travis]
python =
2.6: py26
2.7: py27,coveralls
3.6: py36
3.7: py37