From 6a6efc7877119ec29f1a6114458d636249fbdbc1 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Sun, 15 Jan 2017 22:04:39 +0000 Subject: [PATCH] [tox] call pytest without --pyargs option Previously, we were using --pyargs to make sure pytest would run the test suite against the installed package, because our tests were embedded inside the package and hence importable. Now that they are placed in an external folder, that option is not needed. pytest without options will run all the test modules from the default test paths as defined in setup.cfg, i.e Tests/ folder. The tests will be run against the installed fontTools in the current tox environment. We also pass {posargs} in the 'htmlcov' tox env, to allow passing extra options after `tox -e htmlcov -- {posargs}` to the `coverage html` command. --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 1302c4963..50130ca0e 100644 --- a/tox.ini +++ b/tox.ini @@ -19,8 +19,8 @@ commands = # 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. - cov: coverage run --parallel-mode -m pytest {posargs:--pyargs fontTools} - nocov: pytest {posargs:--pyargs fontTools} + cov: coverage run --parallel-mode -m pytest {posargs} + nocov: pytest {posargs} [testenv:htmlcov] basepython = {env:TOXPYTHON:python3.5} @@ -29,7 +29,7 @@ deps = skip_install = true commands = coverage combine - coverage html + coverage html {posargs} [testenv:codecov] passenv = *