diff options
author | James J Lee <jjl@pobox.com> | 2008-05-05 12:17:35 +0000 |
---|---|---|
committer | James J Lee <jjl@pobox.com> | 2008-05-05 12:17:35 +0000 |
commit | d06e45589d9cfbbaa2a7d1728751ab647efb6b64 (patch) | |
tree | 04fbabf9bb06d7c62cdad94a07c24e27fc4dbf1d /nose/config.py | |
parent | 4e812fb93e10d4143f51b4aa65ab34b641eac5f7 (diff) | |
download | nose-d06e45589d9cfbbaa2a7d1728751ab647efb6b64.tar.gz |
* Fix issue #184 (sys.argv[0] treated as option)
* Correct a docstring re default verbosity level
Diffstat (limited to 'nose/config.py')
-rw-r--r-- | nose/config.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nose/config.py b/nose/config.py index 71dbe2e..738ef48 100644 --- a/nose/config.py +++ b/nose/config.py @@ -166,7 +166,7 @@ class Config(object): self.stopOnError = env.get('NOSE_STOP', False) self.stream = sys.stderr self.testNames = () - self.verbosity = int(env.get('NOSE_VERBOSE', 0)) + self.verbosity = int(env.get('NOSE_VERBOSE', 1)) self.where = () self.workingDir = None """ @@ -219,7 +219,7 @@ class Config(object): for k in keys ]) __str__ = __repr__ - def _parseArgs(self, args, cfg_files): + def _parseArgs(self, argv, cfg_files): def warn_sometimes(msg, name=None, filename=None): if (hasattr(self.plugins, 'excludedOption') and self.plugins.excludedOption(name)): @@ -231,7 +231,7 @@ class Config(object): raise ConfigError(msg) parser = ConfiguredDefaultsOptionParser( self.getParser(), self.configSection, file_error=warn_sometimes) - return parser.parseArgsAndConfigFiles(args, cfg_files) + return parser.parseArgsAndConfigFiles(argv[1:], cfg_files) def configure(self, argv=None, doc=None): """Configure the nose running environment. Execute configure before @@ -250,9 +250,8 @@ class Config(object): options, args = self._parseArgs(argv, options.files) self.options = options - tests = args[1:] - if tests: - self.testNames = tests + if args: + self.testNames = args if options.testNames is not None: self.testNames.extend(tolist(options.testNames)) |