I am using tox for my project.
Here is my tox.ini
file:
[tox]
envlist =
py27,
lint,
coverage
skipsdist = True
[testenv:py27]
dep
https://tox.readthedocs.io/en/latest/config.html
here ,set this option,maybe,you pass
sitepackages=false(true|false) Set to true if you want to create virtual environments that also have access to globally installed packages.
Warning In cases where a command line tool is also installed globally you have to make sure that you use the tool installed in the virtualenv by using python -m (if supported by the tool) or {envbindir}/.
If you forget to do that you will get a warning like this:
WARNING: test command found but not installed in testenv
cmd: /path/to/parent/interpreter/bin/<some command>
env: /foo/bar/.tox/python
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.
The question is old but the answers do not apply to my situation. In my case, once I changed the [testenv]
to [env]
, it works. This is because my Python virtual environment is named as "env".
I don't know why, but to solve I had to clone my repo again. The repo reset doesn't solve only the full clone.
Checkout this tox issue for more details.
Programs that you use in commands
must either be installed in tox' virtual environment or whitelisted:
[tox]
envlist =
py27,
lint,
coverage
skipsdist = True
[testenv:py27]
deps = -rrequirements.txt
whitelist_externals = python
commands = python -m unittest discover -s ./tests
[testenv:coverage]
whitelist_externals = coverage
commands =
coverage run --source=tests -m unittest discover -s tests/
coverage html
coverage report
[testenv:lint]
whitelist_externals = pylint
commands = pylint ./foo