nose-devs/nose — Issue #62: [patch] Gracefully disable restricted plugin options in 'python setup.py test'
Author: jpellerin
Created: 2011-12-14 15:57:29+00:00
State: closed

nose currently fails when running 'python setup.py test' if setup.cfg contains a command line
options for a plugin disabled during this mode.

E.g., the coverage module is disabled for this mode. A developer may want to hard wire --with-
coverage in their project's setup.cfg so it's used everytime they invoke nosetests. The problem
with doing that is it causes 'python setup.py test' to fail:

/usr/local/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/plugins/manager.py:373:
RuntimeWarning: Exclude plugin :
implements report

Usage: setup.py [options]

setup.py: error: no such option: --cover-erase

A non-developer might want to use the easier setup.py test instead, as it automatically
downloads all the test requirements and invokes the appropriate test runner

This patch makes these restricted plugin options gracefully disabled in setup.py test so both
configurations can co-exist. E.g.:

/beans/home/pjenvey/src/python/nose/nose/plugins/manager.py:433: RuntimeWarning:
Excluding option: --with-coverage for disabled plugin: coverage
(option, plugin.name), RuntimeWarning)
test_cache.test_has_key ... ok

Google Code Info:
Issue #: 166
Author: pjenvey%...@gtempaccount.com
Created On: 2008-03-02T21:31:29.000Z
Closed On: 2008-04-02T03:07:23.000Z