nose-devs/nose — Issue #255: Not clear where configuration comes from: options or config files
Author: jpellerin
Created: 2011-12-14 16:05:33+00:00
State: open

What steps will reproduce the problem?
1. $ mkdir bug && cd bug
2. $ cat > setup.cfg <<"EOF"
> [nosetests]
> with-spam = 1
> EOF
3. $ nosetests

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

Expected: something like:

[... snip help output ...]
nosetests: error: no such option: --with-spam (from config file
'.../bug/setup.cfg')

Got:
[... snip help output ...]
nosetests: error: no such option: --with-spam

Please use labels and text to provide additional information.

This has caused me consternation when you forget about a config file. It's
especially confusing because the "--" option prefix seems to clearly imply
the option is from the command line.

In fact, I think it would be ideal if nose.config didn't lie to optparse
about what's on the command line. Instead, it could apply the config file
options after optparse does its work.

Of course, the simplest fix would be a generic warning in these error
messages that the missing option may have come from a config file (and
maybe listing all config files that were loaded).

Google Code Info:
Issue #: 158
Author: j...@pobox.com
Created On: 2008-02-09T20:04:59.000Z
Closed On: 2008-04-02T03:07:43.000Z