Configuration

class nose.config.Config(**kw)

nose configuration.

Instances of Config are used throughout nose to configure behavior, including plugin lists. Here are the default values for all config keys:

self.env = env = kw.pop('env', {})
self.args = ()
self.testMatch = re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)
self.addPaths = not env.get('NOSE_NOPATH', False)
self.configSection = 'nosetests'
self.debug = env.get('NOSE_DEBUG')
self.debugLog = env.get('NOSE_DEBUG_LOG')
self.exclude = None
self.getTestCaseNamesCompat = False
self.includeExe = env.get('NOSE_INCLUDE_EXE',
                          sys.platform in exe_allowed_platforms)
self.ignoreFiles = (re.compile(r'^\.'),
                    re.compile(r'^_'),
                    re.compile(r'^setup\.py$')
                    )
self.include = None
self.loggingConfig = None
self.logStream = sys.stderr
self.options = NoOptions()
self.parser = None
self.plugins = NoPlugins()
self.srcDirs = ('lib', 'src')
self.runOnInit = True
self.stopOnError = env.get('NOSE_STOP', False)
self.stream = sys.stderr
self.testNames = ()
self.verbosity = int(env.get('NOSE_VERBOSE', 1))
self.where = ()
self.py3where = ()
self.workingDir = None
configure(argv=None, doc=None)

Configure the nose running environment. Execute configure before collecting tests with nose.TestCollector to enable output capture and other features.

configureLogging()

Configure logging for nose, or optionally other packages. Any logger name may be set with the debug option, and that logger will be set to debug level and be assigned the same handler as the nose loggers, unless it already has a handler.

configureWhere(where)

Configure the working directory or directories for the test run.

default()

Reset all config values to defaults.

getParser(doc=None)

Get the command line option parser.

help(doc=None)

Return the generated help message

exception nose.config.ConfigError
class nose.config.ConfiguredDefaultsOptionParser(parser, config_section, error=None, file_error=None)

Handler for options from commandline and config files.

class nose.config.NoOptions

Options container that returns None for all options.

exception nose.config.NoSuchOptionError(name)
nose.config.all_config_files()

Return path to any existing user config files, plus any setup.cfg in the current working directory.

nose.config.flag(val)

Does the value look like an on/off flag?

nose.config.user_config_files()

Return path to any existing user config files