[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.
This commit is contained in:
Cosimo Lupo 2016-10-13 19:00:29 +01:00
parent b1846201ba
commit ce313520cf

View File

@ -16,8 +16,8 @@ commands =
# check that we have the expected Python version and architecture # check that we have the expected Python version and architecture
{envpython} -c "import sys; print(sys.version)" {envpython} -c "import sys; print(sys.version)"
{envpython} -c "import struct; print(struct.calcsize('P') * 8)" {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
# run the test suite # run the test suite against the package installed inside tox env
py.test {posargs} py.test {posargs:--pyargs fontTools}
[testenv:coveralls] [testenv:coveralls]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH