nose-devs/nose — Issue #347: Option "---first-package-wins" swallows other command-line parameters due to misconfiguration of OptionParser
Author: jpellerin
Created: 2011-12-14 16:08:46+00:00
State: open

What steps will reproduce the problem?

1. Type "nosetests --first-package-wins --verbosity 3 --with-doctest" in
any arbitrary folder

What is the expected output? What do you see instead?

Nose should discover any unit and doc tests within the current folder,
then execute them with increased verbosity and without screwing-up any
dependencies between one namespace package and another. Instead, the
following error message is presented to the user:

Failure: OSError (No such file C:\Sandboxes\testme\3) ... ERROR

======================================================================
ERROR: Failure: OSError (No such file C:\Sandboxes\testme\3)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Sandboxes\python-nose\nose\failure.py", line 39, in runTest
raise self.exc_class(self.exc_val)
OSError: No such file C:\Sandboxes\testme\3

----------------------------------------------------------------------
XML: build/nosetests.xml
----------------------------------------------------------------------
Ran 1 test in 0.008s

FAILED (errors=1)

What version of the product are you using? On what operating system?

Nosetest 0.11.2.dev and 0.11.1 on Windows Vista and Ubuntu Linux

Please provide any additional information below.

In config.py, the OptionParser configuration for the new "--first-package-
wins" option is missing its "store_true" action attribute, thus causing
the first-package-wins (once used) to consume the next parameter
immediately following it on the original nose command line as its value.

Unfortunately, this also proves especially nasty for anything configured
via the nose setuptools integration, mainly because commands.py currently
causes all key-value pairs within setup.cfg (such as "verbosity=3") to
appear as two separate arguments when seen from within config.py (instead
of simply concatinating them into "--verbosity=3" as any human user would
do).

Google Code Info:
Issue #: 293
Author: ckess...@gmail.com
Created On: 2009-10-03T01:11:41.000Z
Closed On: 2011-06-17T18:59:30.000Z