Among other things, this allows clients to inject an already instantiated FS object in both the UFOReader/UFOWriter 'path' argument.
72 lines
2.0 KiB
INI
72 lines
2.0 KiB
INI
[tox]
|
|
envlist = py{27,37}-cov,py{27,37}-cov-lxml,coverage
|
|
minversion = 2.9.1
|
|
skip_missing_interpreters = true
|
|
|
|
[testenv]
|
|
description = run the tests with pytest under {basepython}
|
|
setenv =
|
|
COVERAGE_FILE={toxinidir}/.coverage.{envname}
|
|
deps =
|
|
-rrequirements.txt
|
|
lxml: -rextra_requirements.txt
|
|
extras = testing
|
|
commands =
|
|
python --version
|
|
python -c "import struct; print('%s-bit' % (struct.calcsize('P') * 8))"
|
|
nocov: pytest {posargs}
|
|
cov: pytest --cov="{envsitepackagesdir}/ufoLib" --cov-config={toxinidir}/.coveragerc {posargs}
|
|
|
|
[testenv:coverage]
|
|
description = run locally after tests to combine coverage data and create reports;
|
|
generates a diff coverage against origin/master (or DIFF_AGAINST env var)
|
|
deps =
|
|
coverage >= 4.4.1, < 5
|
|
diff_cover
|
|
skip_install = true
|
|
setenv =
|
|
COVERAGE_FILE={toxinidir}/.coverage
|
|
passenv =
|
|
DIFF_AGAINST
|
|
changedir = {toxinidir}
|
|
commands =
|
|
coverage erase
|
|
coverage combine
|
|
coverage report
|
|
coverage xml -o {toxworkdir}/coverage.xml
|
|
coverage html
|
|
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
|
|
|
|
[testenv:codecov]
|
|
description = upload coverage data to codecov (only run on CI)
|
|
deps =
|
|
{[testenv:coverage]deps}
|
|
codecov
|
|
skip_install = true
|
|
setenv = {[testenv:coverage]setenv}
|
|
passenv = TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
|
|
changedir = {toxinidir}
|
|
commands =
|
|
coverage combine
|
|
codecov --env TOXENV
|
|
|
|
[testenv:sdist]
|
|
description = build sdist to be uploaded to PyPI
|
|
skip_install = true
|
|
deps =
|
|
setuptools >= 36.4.0
|
|
wheel >= 0.31.0
|
|
changedir = {toxinidir}
|
|
commands =
|
|
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
|
|
python setup.py sdist --dist-dir dist
|
|
|
|
[testenv:wheel]
|
|
description = build wheel package for upload to PyPI
|
|
skip_install = true
|
|
deps = {[testenv:sdist]deps}
|
|
changedir = {toxinidir}
|
|
commands =
|
|
{[testenv:sdist]commands}
|
|
pip wheel -v --no-deps --no-index --no-cache-dir --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist ufoLib
|