fonttools/tox.ini

58 lines
1.5 KiB
INI
Raw Normal View History

[tox]
2018-09-26 15:31:06 +01:00
envlist = py{27,37}-{cy,nocy}, htmlcov
package_name = cu2qu
; we skip tox's own sdist generation as we need to pass different environment
; variables for testing buiding with and without cython
skipsdist = true
[testenv]
2018-09-26 15:31:06 +01:00
setenv =
nocy: CU2QU_WITH_CYTHON=0
cy: CU2QU_WITH_CYTHON=1
cy: CYTHON_TRACE=1
cy: CYTHON_ANNOTATE=1
deps =
-rtest-requirements.txt
-rrequirements.txt
2018-09-26 15:31:06 +01:00
cy: cython
changedir = {toxinidir}
commands =
2018-09-26 15:31:06 +01:00
# create source distribution in a temp dir
python setup.py --quiet sdist --dist-dir {envtmpdir}
# install from sdist
python -m pip install --ignore-installed --pre --no-deps --no-cache-dir --find-links {envtmpdir} {[tox]package_name}
# ensure we are running the requested cu2qu version (compiled vs interpreted)
nocy: python -c "import sys, cu2qu.cu2qu; cu2qu.cu2qu.COMPILED and sys.exit(1)"
cy: python -c "import sys, cu2qu.cu2qu; cu2qu.cu2qu.COMPILED or sys.exit(1)"
# run tests with code coverage enabled
coverage run --parallel-mode -m pytest {posargs}
[testenv:htmlcov]
deps =
coverage
2018-09-26 15:31:06 +01:00
changedir = {toxinidir}
commands =
coverage combine
coverage report
coverage html
[testenv:codecov]
passenv = *
deps =
coverage
codecov
ignore_outcome = true
2018-09-26 15:31:06 +01:00
changedir = {toxinidir}
commands =
coverage combine
codecov --env TRAVIS_PYTHON_VERSION
[testenv:update-cython]
deps = requests
changedir = {toxinidir}
commands =
python tools/update_cython_shadow.py {posargs}