nose2 - Man Page

nose2 – The successor to nose, based on unittest2


nose2 [-s START_DIR] [-t TOP_LEVEL_DIRECTORY] [--config [CONFIG]] [--no-user-config] [--no-plugins] [--plugin PLUGINS] [--exclude-plugin EXCLUDE_PLUGINS] [--verbosity VERBOSITY] [--verbose] [--quiet] [--log-level LOG_LEVEL] [-B] [--coverage PATH] [--coverage-report TYPE] [--coverage-config FILE] [-C] [-D] [-F] [--log-capture] [--pretty-assert] [-h] [testNames ...]


Positional Arguments


Optional Arguments

-s START_DIR, --start-dir START_DIR

Directory to start discovery (. default)

-t TOP_LEVEL_DIRECTORY, --top-level-directory TOP_LEVEL_DIRECTORY, --project-directory TOP_LEVEL_DIRECTORY

Top level directory of project (defaults to start dir)

--config [CONFIG], -c [CONFIG]

Config files to load, if they exist. (unittest.cfg and nose2.cfg in start directory default)


Do not load user config files


Do not load any plugins. Warning: nose2 does not do anything if no plugins are loaded

--plugin PLUGINS

Load this plugin module.

--exclude-plugin EXCLUDE_PLUGINS

Do not load this plugin module

--verbosity VERBOSITY

Set starting verbosity level (int). Applies before -v and -q

--verbose,  -v

Print test case names and statuses. Use multiple -v’s for higher verbosity.

--quiet,  -q

Reduce verbosity. Multiple -q’s result in lower verbosity.

--log-level LOG_LEVEL

Set logging level for message logged to console.

-h,  --help

Show a help message and exit

Plugin Arguments

Command-line arguments added by plugins:

-B,  --output-buffer

Enable output buffer

--coverage PATH

Measure coverage for filesystem path (multi-allowed)

--coverage-report TYPE

Generate selected reports, available types: term, term-missing, annotate, html, xml (multi-allowed)

--coverage-config FILE

Config file for coverage, default: .coveragerc

-C,  --with-coverage

Turn on coverage reporting

-D,  --debugger

Enter pdb on test fail or error

-F,  --fail-fast

Stop the test run after the first error or failure


Enable log capture


Add pretty output for “assert” statements


unittest.cfg and nose2.cfg

Default config files loaded from the start directory; see --config/-c, --start-dir/-s, and --no-user-config.


Default config file for coverage; see --coverage-config.


June 2022