0

I am trying to get the coverage of my tests using TOX and Travis CI. Unfortunately when creating the virtual envs, TOX install my package from PIP, thus not testing the coverage of the actual source code...

How can I prevnt that to happen.

I guess the easiest way to explain is to try:

Clone this: https://github.com/millerf/django-channels-jsonrpc

Create a venv

$>virtualenv venv/

And finally:

$> pip install tox
$> tox -ecoverage 

The coverage does not include channels_jsonrpc/, as tox installed the package in his own venv...

how can I prevent the install of one package with tox?

millerf
  • 686
  • 1
  • 8
  • 16

1 Answers1

3

Tox will install any package you provide in his own env, that's how it works, to make it use your local repo instead of installing a remote version, try changing the deps part of the tox.ini file to:

deps =
    {toxinidir}
    coverage
    coveralls

just always make sure that setup.py is in the root of {toxinidir} path.

You can test it by changing something in your package locally then run tox -ecoverage and verify which lib tox installed by checking ./tox/coverage/lib/python{version}/site-packages/channels_jsonrpc/

HassenPy
  • 2,083
  • 1
  • 16
  • 31