-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
-.TH NOSETESTS "1" "July 2007" "nosetests version 0.10.0a1" "User Commands"
+.TH nosetests 1 "2009-04-23" "0.11" "User Commands"
-nosetests \- unit testing for Python software
+nosetests \- nicer testing for python
+.\" Man page generated from reStructeredText.
-\fBnosetests\fP [\fIoptions\fP] [\fInames\fP]
+nosetests [options] [names]
-nose provides extended test discovery and running features for
nose collects tests automatically from python source files,
directories and packages found in its working directory (which
defaults to the current working directory). Any python source file,
directory or package that matches the testMatch regular expression
-(by default: (?:^|[
\eb_\e.\-])[Tt]est) will be collected as a test (or
+(by default: (?:^|[.\-])[Tt]est) will be collected as a test (or
source for collection of tests). In addition, all other packages
found in the working directory will be examined for python source files
or directories that match testMatch. Package discovery descends all
failure. TestCase subclasses may do the same or use the various
TestCase methods available.
To specify which tests to run, pass test names on the command line:
Test names specified may be file or module names, and may optionally
indicate the test case to run by separating the module or file name
from the test case name with a colon. Filenames may be relative or
- nosetests another.test:TestCase.test_method
- nosetests a.test:TestCase
- nosetests /path/to/test/file.py:test_function
You may also change the working directory where nose looks for tests,
-use the \
-nosetests \fB\-w\fR /path/to/tests
-Note however that support for multiple \fB\-w\fR arguments is deprecated
+nosetests \-w /path/to/tests
+Note however that support for multiple \-w arguments is deprecated
in this version and will be removed in a future release, since as
of nose 0.10 you can get the same behavior by specifying the
*without * the \ fB\-w\fR switch:
+target directories without the \- switch:
nosetests /path/to/tests /another/path/to/tests
Further customization of test selection and loading is possible
through the use of plugins.
features such as output capture and assert introspection) detailed
-In addition to passing command\-line options, you may also put configuration
-options in a .noserc or nose.cfg file in your home directory. These are
-standard .ini\-style config files. Put your nosetests configuration in a
-[nosetests] section, with the \fB\-\-\fR prefix removed:
+In addition to passing command\-line options, you may also put
+configuration options in a .noserc or nose.cfg file in your home
+directory. These are standard .ini\-style config files. Put your
+nosetests configuration in a [nosetests] section. Options are the
+same as on the command line, with the \-\- prefix removed. For
+options that are simple switches, you must supply a value:
All configuration files that are found will be loaded and their options
+There are numerous nose plugins available via easy_install and
+elsewhere. To use a plugin, just install it. The plugin will add
+command line options to nosetests. To verify that the plugin is installed,
+You can add \-v or \-vv to that command to show more information
+If you are running nose.main() or nose.run() from a script, you
+can specify a list of plugins to use by passing a list of plugins
+with the plugins keyword argument.
+nose 0.10 can use SOME plugins that were written for nose 0.9. The
+default plugin manager inserts a compatibility wrapper around 0.9
+plugins that adapts the changed plugin api calls. However, plugins
+that access nose internals are likely to fail, especially if they
+attempt to access test case or test suite classes. For example,
+plugins that try to determine if a test passed to startTest is an
+individual test or a suite will fail, partly because suites are no
+longer passed to startTest and partly because it\'s likely that the
+plugin is trying to find out if the test is an instance of a class
-show this help message and exit
+Output nose version and exit
-Output nose version and exit
+Output list of available plugins and exit. Combine with higher verbosity for greater detail
-Output list of available plugins and exit. Combine
-with higher verbosity for greater detail
+Be more verbose. [NOSE_VERBOSE]
-Be more verbose. [NOSE_VERBOSE]
+Set verbosity; \-\-verbosity=2 is the same as \-v
-Set verbosity; \fB\-\-verbosity\fR=\fI2\fR is the same as \fB\-v\fR
-\fB\-c\fR FILES, \fB\-\-config\fR=\fIFILES\fR
-Load configuration from config file(s). May be
-specified multiple times; in that case, all config
-files will be loaded and combined
+Load configuration from config file(s). May be specified multiple times; in that case, all config files will be loaded and combined
-\fB\-w\fR WHERE, \fB\-\-where\fR=\fIWHERE\fR
-Look for tests in this directory. May be specified
-multiple times. The first directory passed will be
-used as the working directory, in place of the current
-working directory, which is the default. Others will
-be added to the list of tests to execute. [NOSE_WHERE]
+Look for tests in this directory. May be specified multiple times. The first directory passed will be used as the working directory, in place of the current working directory, which is the default. Others will be added to the list of tests to execute. [NOSE_WHERE]
-\fB\-m\fR TESTMATCH, \fB\-\-match\fR=\fITESTMATCH\fR, \fB\-\-testmatch\fR=\fITESTMATCH\fR
-Use this regular expression to find tests
+\fB\-m\fR\fR=REGEX\fR, \fB\-\-match\fR\fR=REGEX\fR, \fB\-\-testmatch\fR\fR=REGEX
+Files, directories, function names, and class names that match this regular expression are considered tests. Default: (?:^|[b_./\-])[Tt]est [NOSE_TESTMATCH]
-Run these tests (comma\-separated list). This argument
-is useful mainly from configuration files; on the
-command line, just pass the tests to run as additional
-arguments with no switch.
+Run these tests (comma\-separated list). This argument is useful mainly from configuration files; on the command line, just pass the tests to run as additional arguments with no switch.
-\fB\-l\fR DEBUG, \fB\-\-debug\fR=\fIDEBUG\fR
-Activate debug logging for one or more systems.
-Available debug loggers: nose, nose.importer,
-nose.inspector, nose.plugins, nose.result and
-nose.selector. Separate multiple names with a comma.
+Activate debug logging for one or more systems. Available debug loggers: nose, nose.importer, nose.inspector, nose.plugins, nose.result and nose.selector. Separate multiple names with a comma.
Log debug messages to this file (default: sys.stderr)
-Load logging config from this file \fB\-\-\fR bypasses all
-other logging config settings.
+Load logging config from this file \-\- bypasses all other logging config settings.
-\fB\-e\fR EXCLUDE, \fB\-\-exclude\fR=\fIEXCLUDE\fR
-Don't run tests that match regular expression
+Don\'t run tests that match regular expression [NOSE_EXCLUDE]
-\fB\-i\fR INCLUDE, \fB\-\-include\fR=\fIINCLUDE\fR
-Also run tests that match regular expression
+This regular expression will be applied to files, directories, function names, and class names for a chance to include additional tests that do not match TESTMATCH. Specify this option multiple times to add more regular expressions [NOSE_INCLUDE]
Stop running tests after the first error or failure
-Don't make any changes to sys.path when loading tests
+Don\'t make any changes to sys.path when loading tests [NOSE_NOPATH]
-Look for tests in python modules that are executable.
-Normal behavior is to exclude executable modules,
-since they may not be import\-safe [NOSE_INCLUDE_EXE]
+Look for tests in python modules that are executable. Normal behavior is to exclude executable modules, since they may not be import\-safe [NOSE_INCLUDE_EXE]
-DO NOT look for tests in python modules that are
-executable. (The default on the windows platform is to
+DO NOT look for tests in python modules that are executable. (The default on the windows platform is to do so.)
-Enable plugin HtmlOutput: Output test results as ugly,
-unstyled html. [NOSE_WITH_HTML\-OUTPUT]
+Traverse through all path entries of a namespace package
-Enable plugin NoseWatch: watch failing tests, retesting when modified [NOSE_WITH_WATCH]
+\fB\-\-first\-package\-wins\fR\fR=DEFAULT\fR, \fB\-\-first\-pkg\-wins\fR\fR=DEFAULT\fR, \fB\-\-1st\-pkg\-wins\fR\fR=DEFAULT
+nose\'s importer will normally evict a package from sys.modules if it sees a package with the same name in a different location. Set this option to disable that behavior.
-Enable plugin Stopwatch: (no help available)
+Run only tests that have attributes specified by ATTR [NOSE_ATTR]
-Run only tests that are faster than FASTER_THAN
+Run only tests for whose attributes the Python expression EXPR evaluates to True [NOSE_EVAL_ATTR]
-Store test timing results in this file.
+Don\'t capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE]
-Enable plugin FigleafSections: (no help available)
+Disable logging capture plugin. Logging configurtion will be left intact. [NOSE_NOLOGCAPTURE]
-Store figleaf section coverage in this file
+Specify custom format to print statements. Uses the same format as used by standard logging handlers. [NOSE_LOGFORMAT]
-Apply attributes in this file to matching functions,
+Specify custom date/time format to print statements. Uses the same format as used by standard logging handlers. [NOSE_LOGDATEFMT]
-Enable plugin NoseTTY: run nosetests more
+Specify which statements to filter in/out. By default everything is captured. If the output is too verbose,
+use this option to filter out needless output
+Example: filter=foo will capture statements issued ONLY to
+ foo or foo.what.ever.sub but not foobar or other logger.
+Specify multiple loggers with comma: filter=foo,bar,baz. [NOSE_LOGFILTER]
-Enable plugin NoseTTY: run nosetests more
+Clear all other logging handlers
-editor program [NOSE_TTY_EDITOR or EDITOR] (currently:
+If you have Ned Batchelder\'s coverage module installed, you may
+activate a coverage report. The coverage report will cover any
+python source module imported after the start of the test run, excluding
+modules that match testMatch. If you want to include those modules too,
+use the \-\-cover\-tests switch, or set the NOSE_COVER_TESTS environment
+variable to a true value. To restrict the coverage report to modules from
+a particular package or packages, use the \-\-cover\-packages switch or the
+NOSE_COVER_PACKAGES environment variable.
-template to invoke edit command. [NOSE_TTY_EDIT_CMD]
-(currently: `%(editor)s %(filename)s \fB\-\-line\fR
+Restrict coverage output to selected packages [NOSE_COVER_PACKAGE]
-\fB\-a\fR ATTR, \fB\-\-attr\fR=\fIATTR\fR
-Run only tests that have attributes specified by ATTR
+Erase previously collected coverage statistics before run
-\fB\-A\fR EXPR, \fB\-\-eval\-attr\fR=\fIEXPR\fR
-Run only tests for whose attributes the Python
-expression EXPR evaluates to True [NOSE_EVAL_ATTR]
+Include test modules in coverage report [NOSE_COVER_TESTS]
-Don't capture stdout (any stdout output will be
-printed immediately) [NOSE_NOCAPTURE]
+Include all python files under working directory in coverage report. Useful for discovering holes in test coverage if not all files are imported by the test suite. [NOSE_COVER_INCLUSIVE]
-Enable plugin Coverage: If you have Ned Batchelder's
-coverage module installed, you may activate a coverage
-report. The coverage report will cover any python
-source module imported after the start of the test
-run, excluding modules that match testMatch. If you
-want to include those modules too, use the \fB\-\-covertests\fR switch, or set the NOSE_COVER_TESTS environment
-variable to a true value. To restrict the coverage
-report to modules from a particular package or
-packages, use the \fB\-\-cover\-packages\fR switch or the
-NOSE_COVER_PACKAGES environment variable.
+Produce HTML coverage information
-Restrict coverage output to selected packages
+Produce HTML coverage informaion in dir
-Erase previously collected coverage statistics before
+Drop into debugger on errors
-Include test modules in coverage report
+Drop into debugger on failures
-Include all python files under working directory in
-coverage report. Useful for discovering holes in test
-coverage if not all files are imported by the test
+Disable special handling of DeprecatedTest exceptions.
-Drop into debugger on errors
+Activate doctest plugin to find and run doctests in non\-test modules.
-Drop into debugger on failures
+Also look for doctests in test modules. Note that classes, methods and functions should have either doctests or non\-doctest tests, not both. [NOSE_DOCTEST_TESTS]
-Disable special handling of DeprecatedTest exceptions.
+Also look for doctests in files with this extension [NOSE_DOCTEST_EXTENSION]
-Enable plugin Doctest: Activate doctest plugin to
-find and run doctests in non\-test modules.
+Change the variable name set to the result of the last interpreter command from the default \'_\'. Can be used to avoid conflicts with the _() function used for text translation. [NOSE_DOCTEST_RESULT_VAR]
-Also look for doctests in test modules
+Find fixtures for a doctest file in module with this name appended to the base name of the doctest file
-Also look for doctests in files with this extension
+Enable plugin IsolationPlugin:
+Activate the isolation plugin to isolate changes to external
+modules to a single test module or package. The isolation plugin
+resets the contents of sys.modules after each test module or
+package runs to its state before the test. PLEASE NOTE that this
+plugin should not be used with the coverage plugin in any other case
+where module reloading may produce undesirable side\-effects.
-Enable plugin IsolationPlugin: Activate the isolation
-plugin to isolate changes to external modules to a
-single test module or package. The isolation plugin
-resets the contents of sys.modules after each test
-module or package runs to its state before the test.
-PLEASE NOTE that this plugin should not be used with
-the coverage plugin in any other case where module
-reloading may produce undesirable side\-effects.
+\fB\-d\fR\fR\fR, \fB\-\-detailed\-errors\fR\fR\fR, \fB\-\-failure\-detail\fR\fR
+Add detail to error output by attempting to evaluate failed asserts [NOSE_DETAILED_ERRORS]
-\fB\-d\fR, \fB\-\-detailed\-errors\fR, \fB\-\-failure\-detail\fR
-Add detail to error output by attempting to evaluate
-failed asserts [NOSE_DETAILED_ERRORS]
+Use this plugin to run tests using the hotshot profiler.
-Enable plugin Profile: Use this plugin to run tests
-using the hotshot profiler. [NOSE_WITH_PROFILE]
+Set sort order for profiler output
-Set sort order for profiler output
+Profiler stats file; default is a new temp file on each run
-Profiler stats file; default is a new temp file on
+Restrict profiler output. See help for pstats.Stats for details
-Restrict profiler output. See help for pstats.Stats
+Disable special handling of SkipTest exceptions.
-Disable special handling of SkipTest exceptions.
+Activate to add a test id (like #1) to each test name output. After
+you\'ve run once to generate test ids, you can re\-run individual
+tests by activating the plugin and passing the ids (with or
+without the # prefix) instead of test names. Activate with \-\-failed
+to rerun failing tests only.
-Enable plugin TestId: Activate to add a test id (like
-#1) to each test name output. After you've run once to
-generate test ids, you can re\-run individual tests by
-activating the plugin and passing the ids (with or
-without the # prefix) instead of test names.
+Store test ids found in test runs in this file. Default is the file .noseids in the working directory.
-Store test ids found in test runs in this file.
+Run the tests that failed in the last test run.
+Spread test run among this many processes. Set a number equal to the number of processors or cores in your machine for best results. [NOSE_PROCESSES]
+Set timeout for return of results from each test runner process. [NOSE_PROCESS_TIMEOUT]
+Enable plugin Xunit: This plugin provides test results in the standard XUnit XML format. [NOSE_WITH_XUNIT]
+Path to xml file to store the xunit report in. Default is nosetests.xml in the working directory [NOSE_XUNIT_FILE]
+Enable plugin AllModules: Collect tests from all python modules.
+Collect and output test names only, don\'t run any tests.
-is written by Jason Pellerin. This manpage was adapted from the output
-program by Jason Pellerin, following the version made by Gustavo Noronha Silva for the Debian GNU/Linux system, but
Copyright (C) 2005-2007 Jason Pellerin
-This is free software. You may redistribute copies of it under the
-terms of the GNU Lesser General Public License
-<http://www.gnu.org/licenses/lgpl.html>. There is NO WARRANTY, to the
-extent permitted by law.
-The project website is at
+.\" Generated by docutils manpage writer on 2009-04-27 20:17.