Pass command line arguments to nose via "python setup.py test"
<h1>Package Settings</h1>

<p>I have built a Python package which uses <a href="http://nose.readthedocs.io/en/latest/" rel="nofollow noreferrer">nose</a> for testing. Therefore, <code>setup.py</code> contains:</p>

<pre><code>..
test_suite='nose.collector',
tests_require=['nose'],
..
</code></pre>

<p>And <code>python setup.py test</code> works as expected:</p>

<pre><code>running test
...
----------------------------------------------------------------------
Ran 3 tests in 0.065s

OK
</code></pre>

<h1>Running with XUnit output</h1>

<p>Since I'm using Jenkins CI, I would like to output the nose results to JUnit XML format:</p>

<pre><code>nosetests &lt;package-name&gt; --with-xunit --verbose
</code></pre>

<p>However, <code>python setup.py test</code> is far more elegant, and it installs the test requirements without having to build a virtual environment.</p>

<p><strong>Is there a way to pass the <code>--with-xunit</code> (or any other parameter) to nose, when calling nose via <code>python setup.py test</code>?</strong></p>