diff --git a/.travis.yml b/.travis.yml index c020587..ec56b2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,13 @@ sudo: false dist: trusty language: python python: + - 2.6 + - 2.7 - 3.6 + - 3.7-dev install: - - pip install tox + - pip install tox tox-travis script: - - tox -e check-py27,check-py36,coveralls + - tox diff --git a/tox.ini b/tox.ini index f32a121..e6a8363 100644 --- a/tox.ini +++ b/tox.ini @@ -1,28 +1,42 @@ [tox] -envlist = flake8, pylint, check-{py27,py36} +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 -deps = - pytest-cov - pytest>=3.5.1 changedir = {toxinidir}/tests covtarget = network_connections pytesttarget = . -[testenv:check-py27] +[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} -deps = {[base]deps} changedir = {[base]changedir} basepython = python2.7 commands = @@ -33,11 +47,10 @@ commands = {posargs} \ {[base]pytesttarget} -[testenv:check-py36] +[testenv:py36] passenv = {[base]passenv} setenv = {[base]setenv} -deps = {[base]deps} changedir = {[base]changedir} basepython = python3.6 commands = @@ -48,6 +61,20 @@ commands = {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} @@ -81,3 +108,10 @@ addopts = -rxs [flake8] show_source = True + +[travis] +python = + 2.6: py26 + 2.7: py27,coveralls + 3.6: py36 + 3.7: py37