Pregunta

By default tox will collect the test from your dependencies too and I want it to collect only the ones from my package.

How can I do this?

¿Fue útil?

Solución

Tox is a tool which creates a new virtualenv for each python version you have configured, installs the module your running and then runs a user-specified command to run the tests. It doesn't actually collect the tests to run. That's up to whichever testing tool you're using: py.test, nose, etc. To do that with tox, you'll edit/create a tox.ini to use the correct command that limits the collection of tests to whatever you want.

With nose:

[tox]
envlist = py26,py27
[testenv]
deps=nose
commands=nosetests test.module

With py.test:

[tox]
envlist = py26,py27
[testenv]
deps=pytest
commands=py.test test.module
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top