tox: add extras; allow to test with/without lxml

calling 'tox -e py37-cov-nolxml' will run tests without lxml,
using built-in ElementTree library
This commit is contained in:
Cosimo Lupo 2018-10-18 15:35:02 +01:00
parent b23a208805
commit b1093c8ac1
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

15
tox.ini
View File

@ -1,19 +1,20 @@
[tox]
minversion = 3.0
envlist = py{27,36,37}-cov, htmlcov
envlist = py{27,37}-cov, htmlcov
[testenv]
deps =
cov: coverage>=4.3
pytest
-rrequirements.txt
install_command =
pip install -v {opts} {packages}
extras =
ufo
woff
unicode
interpolatable
!nolxml: lxml
commands =
# run the test suite against the package installed inside tox env.
# We use parallel mode and then combine later so that coverage.py will take
# paths like .tox/py36/lib/python3.6/site-packages/fontTools and collapse
# them into Lib/fontTools.
# test with or without coverage, passing extra positonal args to pytest
cov: coverage run --parallel-mode -m pytest {posargs}
nocov: pytest {posargs}