bzr branch lp:ubuntu-system-image/client I have two console_scripts in the setup.py's entry_points. One creates system-image-cli and the other creates system-image-dbus. My tox.ini has
[testenv] commands = python setup.py nosetests sitepackages=True
This is because at build-time (both for local testing and during Ubuntu package build) we do not want any dependencies downloaded from PyPI. Everything must come from an installed package.
However, if the Ubuntu packages system-image-cli and system-image-dbus are installed (which provide the /usr/bin scripts of the same name), then
tox --notest -r will not install the console_scripts into the tox environment, and this breaks the tests.
This problem may be related to https://bitbucket.org/hpk42/tox/issue/80/package-cant-be-imported-when-sitepackages but I'm not sure.