fonttools/tox.ini
Cosimo Lupo ce313520cf [tox] use --pyargs fontTools to run tests against package installed in tox env instead of source dir
This will ensure we don't forget to add any data files to the MANIFEST.in (which means test data is not available to the inlined tests).

{posargs} allows to pass extra arguments to the test runner, when runing `tox -- {posargs}` from the command line.

With `--pyargs` option, pytest tries to interpret arguments as python package/module names, and if import fails as regular filesystem paths.
2016-10-14 18:35:33 +01:00

35 lines
899 B
INI

[tox]
envlist = py27, py35
[testenv]
basepython =
py27: {env:TOXPYTHON:python2.7}
pypy: {env:TOXPYTHON:pypy}
py34: {env:TOXPYTHON:python3.4}
py35: {env:TOXPYTHON:python3.5}
deps =
pytest
-rrequirements.txt
install_command =
{envpython} -m pip install -v {opts} {packages}
commands =
# check that we have the expected Python version and architecture
{envpython} -c "import sys; print(sys.version)"
{envpython} -c "import struct; print(struct.calcsize('P') * 8)"
# run the test suite against the package installed inside tox env
py.test {posargs:--pyargs fontTools}
[testenv:coveralls]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
basepython=python3.5
deps =
{[testenv]deps}
pytest-cov
coveralls
skip_install = true
ignore_outcome = true
commands=
# measure test coverage and upload report to coveralls
py.test --cov
coveralls