Simplify tox to avoid repetition

Also took the opportunity to:

* Use more cores for py*-xdist environments
* Update freeze test to use py36
This commit is contained in:
Bruno Oliveira 2018-04-11 18:30:15 -03:00
parent e012dbe346
commit 888fcbc4b4
1 changed files with 14 additions and 22 deletions

36
tox.ini
View File

@ -13,7 +13,7 @@ envlist =
{py27,py36}-{pexpect,xdist,trial,numpy,pluggymaster} {py27,py36}-{pexpect,xdist,trial,numpy,pluggymaster}
py27-nobyte py27-nobyte
doctesting doctesting
py35-freeze py36-freeze
docs docs
[testenv] [testenv]
@ -56,12 +56,11 @@ deps =
hypothesis>=3.5.2 hypothesis>=3.5.2
changedir=testing changedir=testing
commands = commands =
pytest -n1 -ra {posargs:.} pytest -n8 -ra {posargs:.}
[testenv:py36-xdist] [testenv:py36-xdist]
deps = {[testenv:py27-xdist]deps} deps = {[testenv:py27-xdist]deps}
commands = commands = {[testenv:py27-xdist]commands}
pytest -n3 -ra {posargs:testing}
[testenv:py27-pexpect] [testenv:py27-pexpect]
changedir = testing changedir = testing
@ -71,11 +70,10 @@ commands =
pytest -ra test_pdb.py test_terminal.py test_unittest.py pytest -ra test_pdb.py test_terminal.py test_unittest.py
[testenv:py36-pexpect] [testenv:py36-pexpect]
changedir = testing changedir = {[testenv:py27-pexpect]changedir}
platform = linux|darwin platform = {[testenv:py27-pexpect]platform}
deps = {[testenv:py27-pexpect]deps} deps = {[testenv:py27-pexpect]deps}
commands = commands = {[testenv:py27-pexpect]commands}
pytest -ra test_pdb.py test_terminal.py test_unittest.py
[testenv:py27-nobyte] [testenv:py27-nobyte]
deps = deps =
@ -95,18 +93,16 @@ commands =
[testenv:py36-trial] [testenv:py36-trial]
deps = {[testenv:py27-trial]deps} deps = {[testenv:py27-trial]deps}
commands = commands = {[testenv:py27-trial]commands}
pytest -ra {posargs:testing/test_unittest.py}
[testenv:py27-numpy] [testenv:py27-numpy]
deps=numpy deps = numpy
commands= commands=
pytest -ra {posargs:testing/python/approx.py} pytest -ra {posargs:testing/python/approx.py}
[testenv:py36-numpy] [testenv:py36-numpy]
deps=numpy deps = {[testenv:py27-numpy]deps}
commands= commands = {[testenv:py27-numpy]commands}
pytest -ra {posargs:testing/python/approx.py}
[testenv:py27-pluggymaster] [testenv:py27-pluggymaster]
setenv= setenv=
@ -115,12 +111,9 @@ deps =
{[testenv]deps} {[testenv]deps}
git+https://github.com/pytest-dev/pluggy.git@master git+https://github.com/pytest-dev/pluggy.git@master
[testenv:py35-pluggymaster] [testenv:py36-pluggymaster]
setenv= setenv = {[testenv:py27-pluggymaster]setenv}
_PYTEST_SETUP_SKIP_PLUGGY_DEP=1 deps = {[testenv:py27-pluggymaster]deps}
deps =
{[testenv:py27-pluggymaster]deps}
git+https://github.com/pytest-dev/pluggy.git@master
[testenv:docs] [testenv:docs]
skipsdist = True skipsdist = True
@ -176,7 +169,7 @@ changedir = testing
commands = commands =
{envpython} {envbindir}/py.test-jython -ra {posargs} {envpython} {envbindir}/py.test-jython -ra {posargs}
[testenv:py35-freeze] [testenv:py36-freeze]
changedir = testing/freeze changedir = testing/freeze
deps = pyinstaller deps = pyinstaller
commands = commands =
@ -199,7 +192,6 @@ commands =
[pytest] [pytest]
minversion = 2.0 minversion = 2.0
plugins = pytester plugins = pytester
#--pyargs --doctest-modules --ignore=.tox
addopts = -ra -p pytester --ignore=testing/cx_freeze addopts = -ra -p pytester --ignore=testing/cx_freeze
rsyncdirs = tox.ini pytest.py _pytest testing rsyncdirs = tox.ini pytest.py _pytest testing
python_files = test_*.py *_test.py testing/*/*.py python_files = test_*.py *_test.py testing/*/*.py