Skip to content

Commit

Permalink
Fix tox failure due to use of relative path with --cov
Browse files Browse the repository at this point in the history
Move py.test params to setup.cfg in order to make them available
to all pytest executions, regardless if they are run inside or ourside
tox.

This fixes problem where tox was failing to create coverage because
{toxinidir} was expanded to a relative path which is not supported
by pytest-cov.

By using the path mentioned in setup.cfg we avoid this issue as
in this case pytest-cov is able to generate the files.
  • Loading branch information
ssbarnea committed Mar 4, 2019
1 parent 76006b5 commit 69fa141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ deps =
-rrequirements.txt
-rtest-requirements.txt
commands =
unit: py.test --runslow -vv --cov-report=term-missing --cov={toxinidir}/gilt/ --no-cov-on-fail {posargs}
unit: py.test --runslow -vv {posargs}
lint: flake8

[testenv:format]
Expand Down

0 comments on commit 69fa141

Please sign in to comment.