summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--CHANGELOG38
-rw-r--r--MANIFEST.in13
-rw-r--r--NEWS25
-rw-r--r--README.txt7
-rw-r--r--TODO84
-rwxr-xr-x[-rw-r--r--]bin/nosetests0
-rw-r--r--doc/error_class_plugin.html119
-rw-r--r--doc/errorclassplugin.html127
-rw-r--r--doc/index.html6
-rw-r--r--doc/init_plugin.html187
-rw-r--r--doc/module_nose.case.html15
-rw-r--r--doc/module_nose.commands.html13
-rw-r--r--doc/module_nose.config.html17
-rw-r--r--doc/module_nose.core.html65
-rw-r--r--doc/module_nose.exc.html6
-rw-r--r--doc/module_nose.importer.html6
-rw-r--r--doc/module_nose.inspector.html6
-rw-r--r--doc/module_nose.loader.html14
-rw-r--r--doc/module_nose.plugins.manager.html6
-rw-r--r--doc/module_nose.plugins.plugintest.html99
-rw-r--r--doc/module_nose.proxy.html6
-rw-r--r--doc/module_nose.result.html6
-rw-r--r--doc/module_nose.selector.html6
-rw-r--r--doc/module_nose.suite.html8
-rw-r--r--doc/module_nose.tools.html6
-rw-r--r--doc/module_nose.twistedtools.html6
-rw-r--r--doc/module_nose.util.html117
-rw-r--r--doc/plugin_attrib.html7
-rw-r--r--doc/plugin_capture.html6
-rw-r--r--doc/plugin_cover.html6
-rw-r--r--doc/plugin_debug.html6
-rw-r--r--doc/plugin_deprecated.html6
-rw-r--r--doc/plugin_doctests.html40
-rw-r--r--doc/plugin_exceptions.html124
-rw-r--r--doc/plugin_failuredetail.html6
-rw-r--r--doc/plugin_interface.html638
-rw-r--r--doc/plugin_isolate.html6
-rw-r--r--doc/plugin_prof.html18
-rw-r--r--doc/plugin_skip.html6
-rw-r--r--doc/plugin_testid.html14
-rw-r--r--doc/plugintest_environment.html144
-rw-r--r--doc/selector_plugin.html151
-rw-r--r--doc/site.css115
-rw-r--r--doc/unwanted_package.html102
-rw-r--r--doc/writing_plugins.html128
-rw-r--r--functional_tests/doc_tests/test_init_plugin/init_plugin.rst156
-rw-r--r--functional_tests/doc_tests/test_issue089/support/unwanted_package/__init__.py1
-rw-r--r--functional_tests/doc_tests/test_issue089/support/unwanted_package/test_spam.py3
-rw-r--r--functional_tests/doc_tests/test_issue089/support/wanted_package/__init__.py1
-rw-r--r--functional_tests/doc_tests/test_issue089/support/wanted_package/test_eggs.py3
-rw-r--r--functional_tests/doc_tests/test_issue089/unwanted_package.rst72
-rw-r--r--functional_tests/doc_tests/test_issue097/plugintest_environment.rst110
-rw-r--r--functional_tests/doc_tests/test_issue107/plugin_exceptions.rst92
-rw-r--r--functional_tests/doc_tests/test_issue107/support/test_spam.py5
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst119
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/mymodule.py2
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/mypackage/__init__.py1
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/__init__.py1
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/basic.py5
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py2
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py17
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py7
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py12
-rw-r--r--functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py6
-rw-r--r--functional_tests/test_plugintest.py51
-rw-r--r--index.html.tpl2
-rwxr-xr-xinstall-rpm.sh3
-rw-r--r--nose/__init__.py11
-rw-r--r--nose/case.py47
-rw-r--r--nose/commands.py139
-rw-r--r--nose/config.py29
-rw-r--r--nose/core.py83
-rw-r--r--nose/ext/dtcompat.py2
-rw-r--r--nose/importer.py2
-rw-r--r--nose/loader.py84
-rw-r--r--nose/plugins/__init__.py61
-rw-r--r--nose/plugins/attrib.py1
-rw-r--r--nose/plugins/base.py21
-rw-r--r--nose/plugins/doctests.py28
-rw-r--r--nose/plugins/errorclass.py4
-rw-r--r--nose/plugins/manager.py18
-rw-r--r--nose/plugins/plugintest.py124
-rw-r--r--nose/plugins/prof.py12
-rw-r--r--nose/plugins/testid.py7
-rw-r--r--nose/proxy.py1
-rw-r--r--nose/selector.py26
-rw-r--r--nose/suite.py10
-rw-r--r--nose/util.py22
-rwxr-xr-xscripts/mkdocs.py430
-rwxr-xr-xscripts/mkrelease.py195
-rwxr-xr-xscripts/mkwiki.py60
-rw-r--r--setup.cfg4
-rw-r--r--setup.py4
-rw-r--r--unit_tests/test_cases.py24
-rw-r--r--unit_tests/test_config.py4
-rw-r--r--unit_tests/test_doctest_munging.rst105
-rw-r--r--unit_tests/test_id_plugin.py20
-rw-r--r--unit_tests/test_issue_100.rst12
-rw-r--r--unit_tests/test_issue_101.py24
-rw-r--r--unit_tests/test_loader.py66
-rw-r--r--unit_tests/test_plugin.py33
-rw-r--r--unit_tests/test_plugin_manager.py18
103 files changed, 3588 insertions, 1348 deletions
diff --git a/AUTHORS b/AUTHORS
index 509d893..a520db0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,4 +4,5 @@ Mika Eloranta
Jay Parlar
Scot Doyle
James Casbon
-Antoine Pitrou \ No newline at end of file
+Antoine Pitrou
+John J Lee
diff --git a/CHANGELOG b/CHANGELOG
index 4402254..5f87dfd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,41 @@
+0.10.0
+
+- Fixed bug that broke plugins with names containing underscores or
+ hyphens. Thanks to John J Lee for the bug report and patch (Issue
+ #81).
+- Fixed typo in nose.__all__. Thanks to John J Lee for the bug report.
+- Fixed handling of test descriptions that are multiline
+ docstrings. Thanks to James Casbon for the patch (Issue #50).
+- Improved documentation of doctest plugin to make it clear that
+ entities may have doctests, or themselves be tests, but not
+ both. Thanks to John J Lee for the bug report and patch (Issue #84).
+- Made __file__ available in non-python-module doctests.
+- Fixed bug that made it impossible for plugins to exclude package
+ directories from test discovery (Issue #89). Thanks to John J Lee
+ for the bug report and patch.
+- Fixed bug that swallowed TypeError and AttributeError exceptions
+ raised in some plugin calls (Issue #95). Thanks to John J Lee for
+ the bug report.
+- Fixed inconsistencies in many interfaces and docs. Thanks to John J
+ Lee for many bug reports.
+- Fixed bugs in rpm generation (Issue #96). Thanks to Mike Verdone for
+ the bug report and http://bugs.python.org/issue644744 for the fix.
+- Fixed inconsisent use of os.environ in plugin testing
+ utilities. Thanks to John J Lee for the bug report and patch (Issue
+ #97).
+- Fixed bug in test_address that prevented use of nose.case.Test in
+ doctests (Issue #100). Thanks to John J Lee for the bug report.
+- Fixed bug in error class plugin that caused string exceptions to be
+ masked (#Issue 101). Thanks to depaula for the bug report.
+- Fixed bugs in tests and the profiler plugin when running under
+ Windows (Issue #103). Thanks to Sidnei Da Silva for the bug report.
+- Fixed bugs in plugin calls that caused exception swallowing (Issue
+ #107). Thanks to John L Lee for the bug report and patch.
+- Added more plugin example doctests. Thanks to Kumar McMillan and
+ John L Lee for patches and lots of help.
+- Changed default location of id file for TestId plugin from ~/.noseids to
+ .noseids in the configured working directory.
+
0.10.0b1
- Added support for a description attribute on tests in function and
diff --git a/MANIFEST.in b/MANIFEST.in
index cab3dbb..a78ca8d 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,12 @@
include AUTHORS
-include ez_setup.py
-include unit_tests/*/*.py
-include unit_tests/*/*/*.py
-include unit_tests/*/*/*/*.py
-include unit_tests/*/*/*/*/*.py
include CHANGELOG
include NEWS
include README.txt
include lgpl.txt
-include nosetests.1 \ No newline at end of file
+include nosetests.1
+include install-rpm.sh
+include bin/nosetests
+graft doc
+graft examples
+graft unit_tests
+graft functional_tests
diff --git a/NEWS b/NEWS
index 9db6231..fa0d2a1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,21 +1,7 @@
-What's New In 0.10b1
---------------------
+0.10 is finally final!
+----------------------
-.. note:: The entry point for 0.10-series plugins is now
- **nose.plugins.0.10**.
-
-Release 0.10b1 is primarily a bugfix release. Among other bugs, it
-fixes serious issues in the FailureDetail and Capture plugins and
-object introspection during test loading, all of which could result in
-halted test runs. Thanks to Ian Bicking and Jeff Cousens for the bug
-reports.
-
-0.10b1 adds one new feature: tests produced by generators may now set
-a ``description`` attribute. If this attribute is present, its value
-will be output as the test description instead of the default ``test
-name (args)`` description.
-
-The development release of nose, 0.10, marks a major change from the
+The new release of nose, 0.10, marks a major change from the
0.9 series in philosophy and implementation.
Prior to this release, nose was entirely discovery-centric: it would
@@ -39,5 +25,10 @@ plugins`_ for more.
There are many other, less user-visible changes under the hood. See
http://code.google.com/p/python-nose/wiki/VersionZeroTen for an outline.
+This release would have been near-impossible to complete without the
+help of John J Lee and new members of the nose development team Kumar
+McMillan, Grig Gheorgiu, James Casbon, and Titus Brown. Many thanks to
+all of them.
+
.. _`plugin interface reference`: doc/plugin_interface.html
.. _`guide to writing plugins`: doc/writing_plugins.html
diff --git a/README.txt b/README.txt
index b4031a3..37fd52d 100644
--- a/README.txt
+++ b/README.txt
@@ -275,6 +275,11 @@ function test case wrapper for each tuple it yields. As in the example, test
generators must yield tuples, the first element of which must be a callable
and the remaining elements the arguments to be passed to the callable.
+By default, the test name output for a generated test in verbose mode
+will be the name of the generator function or method, followed by the
+args passed to the yielded callable. If you want to show a different test
+name, set the ``description`` attribute of the yielded callable.
+
Setup and teardown functions may be used with test generators. The setup and
teardown attributes must be attached to the generator function::
@@ -319,7 +324,7 @@ nose, by default, follows a few simple rules for test discovery.
loaded as package.module and the directory of *package* will be added to
sys.path.
-* If a object defines a __test__ attribute that does not evaluate to
+* If an object defines a __test__ attribute that does not evaluate to
True, that object will not be collected, nor will any objects it
contains.
diff --git a/TODO b/TODO
index 1929e91..36207d1 100644
--- a/TODO
+++ b/TODO
@@ -1,46 +1,25 @@
-DOCUMENTATION
-
- CHANGELOG
-
- NEWS
-
- sep. upload of index for 0.10 -- link from 0.9 index
-
FEATURES
-rename Failure and split into subclasses for Import and other, and make
-it optionally include the name of the file being considered so that
-Failure test logs can be more informative
-
+* rename Failure and split into subclasses for Import and other, and
+ make it optionally include the name of the file being considered so
+ that Failure test logs can be more informative
* loader
- support module.callable in addition to module:callable names
- - loadTestsFromTestCase -- override to add plugin call
-
-* result/proxy
- - don't use sep proxy obj for each test? -- see under PROFILE
BUGS
--- testid plugin should store ids in .noseids in cwd, not in user home
-
--- when run vs spine suite, makeTest seemingly was called on an object
- that should not have passed the selector --
- sqlalchemy.sql._FunctionGateway, which doesn't match testmatch and
- isn't a testcase subclass -- need to look into it further.
-
-
-2.3 COMPAT
-
-all tests passing as of r203
-
CHORES
+* clean up all scripts
TESTS NEEDED
+ plugin examples
+ - more!
+
deprecated at module/module setup
error at module/module setup
plugin api -- comprehensive integration test that runs a suite with a plugin
@@ -50,52 +29,3 @@ TESTS NEEDED
coverage/doctest -- need tests for coverage/doctest interaction
-PROFILE
-
-need to profile -- on 250 tests with discovery, 0.10-dev is ~ 1 second
-slower than 0.9. Profile and optimize.
-
-one possiblity -- instead of instantiating a result proxy for every
-test, tag each test with a weakref to the nose.case.Test that wraps
-it.
-
-
-older notes:
- not sure how this one can be made to work at the module level, since
- import and testrunning take place separately now -- mods a, b, c are all
- imported before tests are run in a. probably best to have it work at the
- directory and context levels -- that will get pretty close to what it
- does in 0.9
-
- it can be made to work only in surrounding contexts that are generators:
- hook before
- load and yield suite
- hook after
-
- needed in 2 places -- loadTestsFromDir, loadTestsFromNames.
- So loadTestsFromNames will have to become lazy -- what impact will that
- have on unittest compatibility, etc? can it just return a lazysuite?
-
- the problem with loadTestsFromNames is that context teardown requires
- that for a given context, all tests within the context are known before
- teardown of the first suite within the context. Say you have a package of
- tests, a, with subpackages a.b and a.c. User wants to run tests a.b.test
- and a.c.test:
-
- nosetests a.b.test a.c.test
-
- 'a' and 'b' setup and 'b' teardown run naturally with the 1st test
- 'c' setup and teardown run natually with the 2nd test. But when, or
- how, does 'a' teardown run? If all tests are known, then a.c.test can
- run a teardown, because it knows that no more tests in 'a' are going
- to run. But if the 2 tests are loaded lazily -- as is REQUIRED for
- the isolation plugin -- then 1st test will mistakenly run 'a' teardown,
- since it doesn't know as it is torn down that another test in the
- same context is about to load.
-
- can't fix this by a call at the end of the loading process, since then
- context teardowns may interleave -- 'a' and 'b' may be present at once
-
- can only fix it by forcing full context load & unload around each
- test WHEN USING loadTestFromNames -- this is inefficient, but unavoidable
- without controlling the *order* of tests passed to loadTestsFromNames.
diff --git a/bin/nosetests b/bin/nosetests
index 4d74f98..4d74f98 100644..100755
--- a/bin/nosetests
+++ b/bin/nosetests
diff --git a/doc/error_class_plugin.html b/doc/error_class_plugin.html
new file mode 100644
index 0000000..c0ead25
--- /dev/null
+++ b/doc/error_class_plugin.html
@@ -0,0 +1,119 @@
+<html>
+ <head>
+ <title>nose: ErrorClass Plugins</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: ErrorClass Plugins</h1>
+
+ <p>ErrorClass plugins provide an easy way to add support for custom
+handling of particular classes of exceptions.</p>
+<p>An ErrorClass plugin defines one or more ErrorClasses and how each is
+handled and reported on. Each error class is stored in a different
+attribute on the result, and reported separately. Each error class must
+indicate the exceptions that fall under that class, the label to use
+for reporting, and whether exceptions of the class should be
+considered as failures for the whole test run.</p>
+<p>ErrorClasses use a declarative syntax. Assign an ErrorClass to the
+attribute you wish to add to the result object, defining the
+exceptions, label and isfailure attributes. For example, to declare an
+ErrorClassPlugin that defines TodoErrors (and subclasses of TodoError)
+as an error class with the label 'TODO' that is considered a failure,
+do this:</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">Todo</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TodoError</span><span class="p">(</span><span class="n">ErrorClassPlugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">todo</span> <span class="o">=</span> <span class="n">ErrorClass</span><span class="p">(</span><span class="n">Todo</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="s">&#39;TODO&#39;</span><span class="p">,</span> <span class="n">isfailure</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>The MetaErrorClass metaclass translates the ErrorClass declarations
+into the tuples used by the error handling and reporting functions in
+the result. This is an internal format and subject to change; you
+should always use the declarative syntax for attaching ErrorClasses to
+an ErrorClass plugin.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">TodoError</span><span class="o">.</span><span class="n">errorClasses</span> <span class="c"># doctest: +ELLIPSIS</span>
+<span class="go">((&lt;class ...Todo...&gt;, (&#39;todo&#39;, &#39;TODO&#39;, True)),)</span>
+</pre></div>
+</blockquote>
+<p>Let's see the plugin in action. First some boilerplate.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">sys</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">buf</span> <span class="o">=</span> <span class="n">unittest</span><span class="o">.</span><span class="n">_WritelnDecorator</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>Now define a test case that raises a Todo.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TestTodo</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">runTest</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="n">Todo</span><span class="p">(</span><span class="s">&quot;I need to test something&quot;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">case</span> <span class="o">=</span> <span class="n">TestTodo</span><span class="p">()</span>
+</pre></div>
+</blockquote>
+<p>Prepare the result using our plugin. Normally this happens during the
+course of test execution within nose -- you won't be doing this
+yourself. For the purposes of this testing document, I'm stepping
+through the internal process of nose so you can see what happens at
+each step.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">plugin</span> <span class="o">=</span> <span class="n">TodoError</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">unittest</span><span class="o">.</span><span class="n">_TextTestResult</span><span class="p">(</span><span class="n">stream</span><span class="o">=</span><span class="n">buf</span><span class="p">,</span>
+<span class="gp">... </span> <span class="n">descriptions</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">verbosity</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">plugin</span><span class="o">.</span><span class="n">prepareTestResult</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>Now run the test. TODO is printed.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">case</span><span class="p">(</span><span class="n">result</span><span class="p">)</span> <span class="c"># doctest: +ELLIPSIS</span>
+<span class="go">runTest (....TestTodo) ... TODO</span>
+</pre></div>
+</blockquote>
+<p>Errors and failures are empty, but todo has our test:</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">errors</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">failures</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">todo</span> <span class="c"># doctest: +ELLIPSIS</span>
+<span class="go">[(&lt;....TestTodo testMethod=runTest&gt;, &#39;...Todo: I need to test something\n&#39;)]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">printErrors</span><span class="p">()</span> <span class="c"># doctest: +ELLIPSIS</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">======================================================================</span>
+<span class="go">TODO: runTest (....TestTodo)</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">Todo</span>: <span class="n-Identifier">I need to test something</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+</pre></div>
+</blockquote>
+<p>Since we defined a Todo as a failure, the run was not successful.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">wasSuccessful</span><span class="p">()</span>
+<span class="go">False</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/errorclassplugin.html b/doc/errorclassplugin.html
deleted file mode 100644
index e04ae11..0000000
--- a/doc/errorclassplugin.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<html>
- <head>
- <title>nose: ErrorClass Plugins</title>
- <link rel="stylesheet" href="site.css" type="text/css"></link>
- </head>
- <body>
-
- <div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
-
- </div>
-
- <div id="main">
- <h1>nose: ErrorClass Plugins</h1>
-
- <p>ErrorClass plugins provide an easy way to add support for custom
-handling of particular classes of exceptions.</p>
-<p>An ErrorClass plugin defines one or more ErrorClasses and how each is
-handled and reported on. Each error class is stored in a different
-attribute on the result, and reported separately. Each error class must
-indicate the exceptions that fall under that class, the label to use
-for reporting, and whether exceptions of the class should be
-considered as failures for the whole test run.</p>
-<p>ErrorClasses use a declarative syntax. Assign an ErrorClass to the
-attribute you wish to add to the result object, defining the
-exceptions, label and isfailure attributes. For example, to declare an
-ErrorClassPlugin that defines TodoErrors (and subclasses of TodoError)
-as an error class with the label 'TODO' that is considered a failure,
-do this:</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; class Todo(Exception):
-... pass
-&gt;&gt;&gt; class TodoError(ErrorClassPlugin):
-... todo = ErrorClass(Todo, label='TODO', isfailure=True)
-</pre>
-</blockquote>
-<p>The MetaErrorClass metaclass translates the ErrorClass declarations
-into the tuples used by the error handling and reporting functions in
-the result. This is an internal format and subject to change; you
-should always use the declarative syntax for attaching ErrorClasses to
-an ErrorClass plugin.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; TodoError.errorClasses # doctest: +ELLIPSIS
-((&lt;class ...Todo...&gt;, ('todo', 'TODO', True)),)
-</pre>
-</blockquote>
-<p>Let's see the plugin in action. First some boilerplate.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; import sys
-&gt;&gt;&gt; import unittest
-&gt;&gt;&gt; buf = unittest._WritelnDecorator(sys.stdout)
-</pre>
-</blockquote>
-<p>Now define a test case that raises a Todo.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; class TestTodo(unittest.TestCase):
-... def runTest(self):
-... raise Todo(&quot;I need to test something&quot;)
-&gt;&gt;&gt; case = TestTodo()
-</pre>
-</blockquote>
-<p>Prepare the result using our plugin. Normally this happens during the
-course of test execution within nose -- you won't be doing this
-yourself. For the purposes of this testing document, I'm stepping
-through the internal process of nose so you can see what happens at
-each step.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; plugin = TodoError()
-&gt;&gt;&gt; result = unittest._TextTestResult(stream=buf,
-... descriptions=0, verbosity=2)
-&gt;&gt;&gt; plugin.prepareTestResult(result)
-</pre>
-</blockquote>
-<p>Now run the test. TODO is printed.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; case(result) # doctest: +ELLIPSIS
-runTest (....TestTodo) ... TODO
-</pre>
-</blockquote>
-<p>Errors and failures are empty, but todo has our test:</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; result.errors
-[]
-&gt;&gt;&gt; result.failures
-[]
-&gt;&gt;&gt; result.todo # doctest: +ELLIPSIS
-[(&lt;....TestTodo testMethod=runTest&gt;, '...Todo: I need to test something\n')]
-&gt;&gt;&gt; result.printErrors() # doctest: +ELLIPSIS
-&lt;BLANKLINE&gt;
-======================================================================
-TODO: runTest (....TestTodo)
-----------------------------------------------------------------------
-Traceback (most recent call last):
-...
-Todo: I need to test something
-&lt;BLANKLINE&gt;
-</pre>
-</blockquote>
-<p>Since we defined a Todo as a failure, the run was not successful.</p>
-<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; result.wasSuccessful()
-False
-</pre>
-</blockquote>
-
-
- </div>
- <script src="http://www.google-analytics.com/urchin.js"
- type="text/javascript">
- </script>
- <script type="text/javascript">
- _uacct = "UA-2236166-1";
- urchinTracker();
- </script>
- </body>
-</html>
-
diff --git a/doc/index.html b/doc/index.html
index e06e692..e2f685e 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -6,15 +6,15 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
</div>
<div id="main">
<h1>nose: API documentation</h1>
<div class="idx">
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
</div>
diff --git a/doc/init_plugin.html b/doc/init_plugin.html
new file mode 100644
index 0000000..b2ef404
--- /dev/null
+++ b/doc/init_plugin.html
@@ -0,0 +1,187 @@
+<html>
+ <head>
+ <title>nose: Running Initialization Code Before the Test Run</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: Running Initialization Code Before the Test Run</h1>
+
+ <p>Many applications, especially those using web frameworks like <a class="reference" href="http://pylonshq.com/">Pylons</a>
+or <a class="reference" href="http://www.djangoproject.com/">Django</a>, can't be tested without first being configured or
+otherwise initialized. Plugins can fulfill this requirement by
+implementing <a class="reference" href="plugin_interface.html#begin">begin()</a>.</p>
+<p>In this example, we'll use a very simple example: a widget class that
+can't be tested without a configuration.</p>
+<p>Here's the widget class. It's configured at the class or instance
+level by setting the <tt class="docutils literal"><span class="pre">cfg</span></tt> attribute to a dictionary.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">ConfigurableWidget</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">cfg</span> <span class="o">=</span> <span class="bp">None</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">can_frobnicate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">cfg</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;can_frobnicate&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">likes_cheese</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">cfg</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;likes_cheese&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>The tests verify that the widget's methods can be called without
+raising any exceptions.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TestConfigurableWidget</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">widget</span> <span class="o">=</span> <span class="n">ConfigurableWidget</span><span class="p">()</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">test_can_frobnicate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="sd">&quot;&quot;&quot;Widgets can frobnicate (or not)&quot;&quot;&quot;</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">widget</span><span class="o">.</span><span class="n">can_frobnicate</span><span class="p">()</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">test_likes_cheese</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="sd">&quot;&quot;&quot;Widgets might like cheese&quot;&quot;&quot;</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">widget</span><span class="o">.</span><span class="n">likes_cheese</span><span class="p">()</span>
+</pre></div>
+</blockquote>
+<p>The tests are bundled into a suite that we can pass to the test runner.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">suite</span><span class="p">():</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">([</span>
+<span class="gp">... </span> <span class="n">TestConfigurableWidget</span><span class="p">(</span><span class="s">&#39;test_can_frobnicate&#39;</span><span class="p">),</span>
+<span class="gp">... </span> <span class="n">TestConfigurableWidget</span><span class="p">(</span><span class="s">&#39;test_likes_cheese&#39;</span><span class="p">)])</span>
+</pre></div>
+</blockquote>
+<p>When we run tests without first configuring the ConfigurableWidget,
+the tests fail.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p>The run() function in <a class="reference" href="module_nose.plugins.plugintest.html">nose.plugins.plugintest</a> reformats test result
+output to remove timings, which will vary from run to run, and
+redirects the output to stdout.</p>
+<blockquote class="last">
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+</pre></div>
+</blockquote>
+</div>
+<!-- -->
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">argv</span> <span class="o">=</span> <span class="p">[</span><span class="n">__file__</span><span class="p">,</span> <span class="s">&#39;-v&#39;</span><span class="p">]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">,</span> <span class="n">suite</span><span class="o">=</span><span class="n">suite</span><span class="p">())</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">Widgets can frobnicate (or not) ... ERROR</span>
+<span class="go">Widgets might like cheese ... ERROR</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">======================================================================</span>
+<span class="go">ERROR: Widgets can frobnicate (or not)</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">AttributeError</span>: <span class="n-Identifier">&#39;NoneType&#39; object has no attribute &#39;get&#39;</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">======================================================================</span>
+<span class="go">ERROR: Widgets might like cheese</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">AttributeError</span>: <span class="n-Identifier">&#39;NoneType&#39; object has no attribute &#39;get&#39;</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 2 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">FAILED (errors=2)</span>
+</pre></div>
+</blockquote>
+<p>To configure the widget system before running tests, write a plugin
+that implements <a class="reference" href="plugin_interface.html#begin">begin()</a> and initializes the system with a
+hard-coded configuration. (Later, we'll write a better plugin that
+accepts a command-line argument specifying the configuration file.)</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">ConfiguringPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span> <span class="c"># always on</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">begin</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">ConfigurableWidget</span><span class="o">.</span><span class="n">cfg</span> <span class="o">=</span> <span class="p">{}</span>
+</pre></div>
+</blockquote>
+<p>Now configure and execute a new test run using the plugin, which will
+inject the hard-coded configuration.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">,</span> <span class="n">suite</span><span class="o">=</span><span class="n">suite</span><span class="p">(),</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">ConfiguringPlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">Widgets can frobnicate (or not) ... ok</span>
+<span class="go">Widgets might like cheese ... ok</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 2 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+<p>This time the tests pass, because the widget class is configured.</p>
+<p>But the ConfiguringPlugin is pretty lame -- the configuration it
+installs is hard coded. A better plugin would allow the user to
+specify a configuration file on the command line:</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">BetterConfiguringPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="p">{}):</span>
+<span class="gp">... </span> <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--widget-config&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
+<span class="gp">... </span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;widget_config&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span>
+<span class="gp">... </span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;Specify path to widget config file&#39;</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">widget_config</span><span class="p">:</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">load_config</span><span class="p">(</span><span class="n">options</span><span class="o">.</span><span class="n">widget_config</span><span class="p">)</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">begin</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">ConfigurableWidget</span><span class="o">.</span><span class="n">cfg</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">cfg</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">load_config</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">from</span> <span class="nn">ConfigParser</span> <span class="k">import</span> <span class="n">ConfigParser</span>
+<span class="gp">... </span> <span class="n">p</span> <span class="o">=</span> <span class="n">ConfigParser</span><span class="p">()</span>
+<span class="gp">... </span> <span class="n">p</span><span class="o">.</span><span class="n">read</span><span class="p">([</span><span class="n">path</span><span class="p">])</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">cfg</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">items</span><span class="p">(</span><span class="s">&#39;DEFAULT&#39;</span><span class="p">))</span>
+</pre></div>
+</blockquote>
+<p>To use the plugin, we need a config file.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">cfg_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;example.cfg&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="nb">open</span><span class="p">(</span><span class="n">cfg_file</span><span class="p">,</span> <span class="s">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;&quot;&quot;</span><span class="se">\</span>
+<span class="gp">... </span><span class="s">[DEFAULT]</span>
+<span class="gp">... </span><span class="s">can_frobnicate = 1</span>
+<span class="gp">... </span><span class="s">likes_cheese = 0</span>
+<span class="gp">... </span><span class="s">&quot;&quot;&quot;</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>Now we can execute a test run using that configuration, after first
+resetting the widget system to an unconfigured state.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">ConfigurableWidget</span><span class="o">.</span><span class="n">cfg</span> <span class="o">=</span> <span class="bp">None</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">argv</span> <span class="o">=</span> <span class="p">[</span><span class="n">__file__</span><span class="p">,</span> <span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="s">&#39;--widget-config&#39;</span><span class="p">,</span> <span class="n">cfg_file</span><span class="p">]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">,</span> <span class="n">suite</span><span class="o">=</span><span class="n">suite</span><span class="p">(),</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">BetterConfiguringPlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">Widgets can frobnicate (or not) ... ok</span>
+<span class="go">Widgets might like cheese ... ok</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 2 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/module_nose.case.html b/doc/module_nose.case.html
index 5e7fe6b..cf81bbd 100644
--- a/doc/module_nose.case.html
+++ b/doc/module_nose.case.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#Test">Test</a></li><li><a href="#Failure">Failure</a></li><li><a href="#TestBase">TestBase</a></li><li><a href="#MethodTestCase">MethodTestCase</a></li><li><a href="#FunctionTestCase">FunctionTestCase</a></li></ul>
</div>
@@ -29,7 +29,8 @@ needed.</p>
</div></div><div class="method section"><span class="method name">__call__<span class="args">(self, *arg, **kwarg)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">__init__<span class="args">(self, test, config=None, resultProxy=None)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_context<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">address<span class="args">(self)</span></span><div class="method doc"><p>Return a round-trip name for this test, a name that can be
fed back as input to loadTestByName and (assuming the same
plugin configuration) result in the loading of this test.</p>
-</div></div><div class="method section"><span class="method name">afterTest<span class="args">(self, result)</span></span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">assertAlmostEqual<span class="args">(self, first, second, places=7, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail if the two objects are unequal as determined by their
+</div></div><div class="method section"><span class="method name">afterTest<span class="args">(self, result)</span></span><div class="method doc"><p>Called before test is run (before result.startTest)</p>
+</div></div><div class="method section inherited"><span class="method name">assertAlmostEqual<span class="args">(self, first, second, places=7, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.</p>
<p>Note that decimal places (from zero) are usually not the same
@@ -66,7 +67,8 @@ deemed to have suffered an error, exactly as for an
unexpected exception.</p>
</div></div><div class="method section inherited"><span class="method name">assertTrue<span class="args">(self, expr, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail the test unless the expression is true.</p>
</div></div><div class="method section inherited"><span class="method name">assert_<span class="args">(self, expr, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail the test unless the expression is true.</p>
-</div></div><div class="method section"><span class="method name">beforeTest<span class="args">(self, result)</span></span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">countTestCases<span class="args">(self)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">debug<span class="args">(self)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Run the test without collecting errors in a TestResult</p>
+</div></div><div class="method section"><span class="method name">beforeTest<span class="args">(self, result)</span></span><div class="method doc"><p>Called after test is complete (after result.stopTest)</p>
+</div></div><div class="method section inherited"><span class="method name">countTestCases<span class="args">(self)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">debug<span class="args">(self)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Run the test without collecting errors in a TestResult</p>
</div></div><div class="method section inherited"><span class="method name">defaultTestResult<span class="args">(self)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"></div></div><div class="method section"><span class="method name">exc_info<span class="args">(self)</span></span><div class="method doc"><p>Extract exception info.</p>
</div></div><div class="method section inherited"><span class="method name">fail<span class="args">(self, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail immediately, with the given message.</p>
</div></div><div class="method section inherited"><span class="method name">failIf<span class="args">(self, expr, msg=None)</span></span><span class="method inherited">(inherited from TestCase)</span><div class="method doc"><p>Fail the test if the expression is true.</p>
@@ -91,7 +93,8 @@ arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.</p>
-</div></div><div class="method section"><span class="method name">id<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">run<span class="args">(self, result)</span></span><div class="method doc"><p>Modified run for the test wrapper.</p>
+</div></div><div class="method section"><span class="method name">id<span class="args">(self)</span></span><div class="method doc"><p>Get a short(er) description of the test</p>
+</div></div><div class="method section"><span class="method name">run<span class="args">(self, result)</span></span><div class="method doc"><p>Modified run for the test wrapper.</p>
<p>From here we don't call result.startTest or stopTest or
addSuccess. The wrapper calls addError/addFailure only if its
own setup or teardown fails, or running the wrapped test fails
diff --git a/doc/module_nose.commands.html b/doc/module_nose.commands.html
index 902ef91..f22f60f 100644
--- a/doc/module_nose.commands.html
+++ b/doc/module_nose.commands.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#nosetests">nosetests</a></li></ul><h2>Functions</h2><ul><li><a href="#get_user_options">get_user_options</a></li></ul><h2>Attributes</h2><ul><li><a href="#option_blacklist">option_blacklist</a></li></ul>
</div>
@@ -19,9 +19,8 @@
<pre class="literal-block">
python setup.py nosetests
</pre>
-<p>This command has a few benefits over the standard <cite>test</cite> command: all nose
-plugins are supported, and you can configure the test run with both command
-line arguments and settings in your setup.cfg file.</p>
+<p>This command has one benefit over the standard <cite>test</cite> command: all nose
+plugins are supported.</p>
<p>To configure the <cite>nosetests</cite> command, add a [nosetests] section to your
setup.cfg. The [nosetests] section can contain any command line arguments that
nosetests supports. The differences between issuing an option on the command
@@ -109,7 +108,7 @@ for it if necessary); the remaining arguments are
'src_option' in the 'src_cmd' command object, and copy it to
'dst_option' in the current command object&quot;.</p>
</div></div><div class="method section inherited"><span class="method name">spawn<span class="args">(self, cmd, search_path=1, level=1)</span></span><span class="method inherited">(inherited from Command)</span><div class="method doc"><p>Spawn an external command respecting dry-run flag.</p>
-</div></div><div class="method section inherited"><span class="method name">warn<span class="args">(self, msg)</span></span><span class="method inherited">(inherited from Command)</span><div class="method doc"></div></div><h3>Attributes</h3><div class="attr section"><span class="attr name">_nosetests__config</span><pre class="attr value">Default value: Config(addPaths=True, args=(), configSection=&#39;nosetests&#39;, debug=None, debugLog=None, env={}, exclude=None, files=[&#39;/home/jhp/.noserc&#39;], getTestCaseNamesCompat=False, ignoreFiles=(&lt;_sre.SRE_Pattern object&gt;, &lt;_sre.SRE_Pattern object&gt;, &lt;_sre.SRE_Pattern object&gt;), include=None, includeExe=False, logStream=&lt;open file &#39;&lt;stderr&gt;&#39;, mode &#39;w&#39;&gt;, loggingConfig=None, options=(), parser=&lt;optparse.OptionParser instance&gt;, plugins=&lt;nose.plugins.manager.DefaultPluginManager object&gt;, runOnInit=True, srcDirs=(&#39;lib&#39;, &#39;src&#39;), stopOnError=False, stream=&lt;open file &#39;&lt;stderr&gt;&#39;, mode &#39;w&#39;&gt;, testMatch=&lt;_sre.SRE_Pattern object&gt;, testMatchPat=&#39;(?:^|[\\b_\\./-])[Tt]est&#39;, testNames=(), verbosity=1, where=(), workingDir=&#39;/home/jhp/work/nose/svn/trunk&#39;)</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">_nosetests__parser</span><pre class="attr value">Default value: &lt;optparse.OptionParser instance&gt;</pre><div class="attr doc"></div></div><div class="attr section inherited"><span class="attr name">command_consumes_arguments</span><pre class="attr value">Default value: False</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">description</span><pre class="attr value">Default value: Run unit tests using nosetests</pre><div class="attr doc"></div></div><div class="attr section inherited"><span class="attr name">sub_commands</span><pre class="attr value">Default value: []</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">user_options</span><pre class="attr value">Default value: [(&#39;version&#39;, &#39;V&#39;, &#39;Output nose version and exit&#39;), (&#39;plugins&#39;, &#39;p&#39;, &#39;Output list of available plugins and exit. Combine with higher verbosity for greater detail&#39;), (&#39;verbosity=&#39;, None, &#39;Set verbosity; --verbosity=2 is the same as -v&#39;), (&#39;quiet=&#39;, &#39;q&#39;, &#39;&#39;), (&#39;config=&#39;, &#39;c&#39;, &#39;Load configuration from config file(s). May be specified multiple times; in that case, all config files will be loaded and combined&#39;), (&#39;where=&#39;, &#39;w&#39;, &#39;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]&#39;), (&#39;match=&#39;, &#39;m&#39;, &#39;Use this regular expression to find tests [NOSE_TESTMATCH]&#39;), (&#39;tests=&#39;, None, &#39;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.&#39;), (&#39;debug=&#39;, &#39;l&#39;, &#39;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.&#39;), (&#39;debug-log=&#39;, None, &#39;Log debug messages to this file (default: sys.stderr)&#39;), (&#39;logging-config=&#39;, None, &#39;Load logging config from this file -- bypasses all other logging config settings.&#39;), (&#39;exclude=&#39;, &#39;e&#39;, &quot;Don&#39;t run tests that match regular expression [NOSE_EXCLUDE]&quot;), (&#39;include=&#39;, &#39;i&#39;, &#39;Also run tests that match regular expression [NOSE_INCLUDE]&#39;), (&#39;stop&#39;, &#39;x&#39;, &#39;Stop running tests after the first error or failure&#39;), (&#39;no-path-adjustment=&#39;, &#39;P&#39;, &quot;Don&#39;t make any changes to sys.path when loading tests [NOSE_NOPATH]&quot;), (&#39;exe&#39;, None, &#39;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]&#39;), (&#39;noexe=&#39;, None, &#39;DO NOT look for tests in python modules that are executable. (The default on the windows platform is to do so.)&#39;), (&#39;with-trestle&#39;, None, &#39;Enable plugin Trestle: \nDoctest for REST apps in ReST files. Parses reStructuredText\ndocuments looking for request and response sections, and\nconstructs test examples that make the requests and expect to\nreceive the response(s) defined for the requests. A fixtures file\nreferenced by each reStructuredText document may be used to define\nclass and test level fixtures, as well as the http client to be\nused to make the requests.\n [NOSE_WITH_TRESTLE]&#39;), (&#39;trestle-extension=&#39;, None, &#39;Look for trestle tests in files with this extension&#39;), (&#39;trestle-css=&#39;, None, &#39;Include this .css file in generated html documentation files. Relative paths are relative to the trestle package or your working dir&#39;), (&#39;trestle-output=&#39;, None, &#39;Output generated html documentation files in this directory. Relative paths are relative to your working dir.&#39;), (&#39;with-exampleplugin&#39;, None, &#39;Enable plugin ExamplePlugin: (no help available) [NOSE_WITH_EXAMPLEPLUGIN]&#39;), (&#39;with-html-output&#39;, None, &#39;Enable plugin HtmlOutput: Output test results as ugly, unstyled html.\n [NOSE_WITH_HTML-OUTPUT]&#39;), (&#39;with-stopwatch&#39;, None, &#39;Enable plugin Stopwatch: (no help available) [NOSE_WITH_STOPWATCH]&#39;), (&#39;faster-than=&#39;, None, &#39;Run only tests that are faster than FASTER_THAN seconds.&#39;), (&#39;stopwatch-file=&#39;, None, &#39;Store test timing results in this file.&#39;), (&#39;with-figleafsections&#39;, None, &#39;Enable plugin FigleafSections: (no help available) [NOSE_WITH_FIGLEAFSECTIONS]&#39;), (&#39;figleaf-file=&#39;, None, &#39;Store figleaf section coverage in this file&#39;), (&#39;decorator-file=&#39;, None, &#39;Apply attributes in this file to matching functions, classes, and methods&#39;), (&#39;with-tty&#39;, None, &#39;Enable plugin NoseTTY: run nosetests more interactively [NOSE_WITH_TTY]&#39;), (&#39;tty&#39;, None, &#39;Enable plugin NoseTTY: run nosetests more interactively [NOSE_TTY]&#39;), (&#39;tty-editor=&#39;, None, &#39;editor program [NOSE_TTY_EDITOR or EDITOR] (currently: `None`)&#39;), (&#39;tty-edit-cmd=&#39;, None, &#39;template to invoke edit command. [NOSE_TTY_EDIT_CMD] (currently: `%(editor)s %(filename)s --line %(lineno)s`)&#39;), (&#39;attr=&#39;, &#39;a&#39;, &#39;Run only tests that have attributes specified by ATTR [NOSE_ATTR]&#39;), (&#39;eval-attr=&#39;, &#39;A&#39;, &#39;Run only tests for whose attributes the Python expression EXPR evaluates to True [NOSE_EVAL_ATTR]&#39;), (&#39;nocapture=&#39;, &#39;s&#39;, &quot;Don&#39;t capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE]&quot;), (&#39;with-coverage&#39;, None, &quot;Enable plugin Coverage: \nIf you have Ned Batchelder&#39;s coverage module installed, you may\nactivate a coverage report. The coverage report will cover any\npython source module imported after the start of the test run, excluding\nmodules that match testMatch. If you want to include those modules too,\nuse the --cover-tests switch, or set the NOSE_COVER_TESTS environment\nvariable to a true value. To restrict the coverage report to modules from\na particular package or packages, use the --cover-packages switch or the\nNOSE_COVER_PACKAGES environment variable.\n [NOSE_WITH_COVERAGE]&quot;), (&#39;cover-package=&#39;, None, &#39;Restrict coverage output to selected packages [NOSE_COVER_PACKAGE]&#39;), (&#39;cover-erase&#39;, None, &#39;Erase previously collected coverage statistics before run&#39;), (&#39;cover-tests&#39;, None, &#39;Include test modules in coverage report [NOSE_COVER_TESTS]&#39;), (&#39;cover-inclusive&#39;, None, &#39;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]&#39;), (&#39;pdb&#39;, None, &#39;Drop into debugger on errors&#39;), (&#39;pdb-failures&#39;, None, &#39;Drop into debugger on failures&#39;), (&#39;no-deprecated&#39;, None, &#39;Disable special handling of DeprecatedTest exceptions.&#39;), (&#39;with-doctest&#39;, None, &#39;Enable plugin Doctest: \nActivate doctest plugin to find and run doctests in non-test modules.\n [NOSE_WITH_DOCTEST]&#39;), (&#39;doctest-tests&#39;, None, &#39;Also look for doctests in test modules [NOSE_DOCTEST_TESTS]&#39;), (&#39;doctest-extension=&#39;, None, &#39;Also look for doctests in files with this extension [NOSE_DOCTEST_EXTENSION]&#39;), (&#39;with-isolation&#39;, None, &#39;Enable plugin IsolationPlugin: \nActivate the isolation plugin to isolate changes to external\nmodules to a single test module or package. The isolation plugin\nresets the contents of sys.modules after each test module or\npackage runs to its state before the test. PLEASE NOTE that this\nplugin should not be used with the coverage plugin in any other case\nwhere module reloading may produce undesirable side-effects.\n [NOSE_WITH_ISOLATION]&#39;), (&#39;detailed-errors&#39;, &#39;d&#39;, &#39;Add detail to error output by attempting to evaluate failed asserts [NOSE_DETAILED_ERRORS]&#39;), (&#39;with-profile&#39;, None, &#39;Enable plugin Profile: \nUse this plugin to run tests using the hotshot profiler. \n [NOSE_WITH_PROFILE]&#39;), (&#39;profile-sort=&#39;, None, &#39;Set sort order for profiler output&#39;), (&#39;profile-stats-file=&#39;, None, &#39;Profiler stats file; default is a new temp file on each run&#39;), (&#39;profile-restrict=&#39;, None, &#39;Restrict profiler output. See help for pstats.Stats for details&#39;), (&#39;no-skip&#39;, None, &#39;Disable special handling of SkipTest exceptions.&#39;), (&#39;with-id&#39;, None, &quot;Enable plugin TestId: \nActivate to add a test id (like #1) to each test name output. After\nyou&#39;ve run once to generate test ids, you can re-run individual\ntests by activating the plugin and passing the ids (with or\nwithout the # prefix) instead of test names.\n [NOSE_WITH_ID]&quot;), (&#39;id-file=&#39;, None, &#39;Store test ids found in test runs in this file.&#39;)]</pre><div class="attr doc"></div></div></div></div><h2>Functions</h2>
+</div></div><div class="method section inherited"><span class="method name">warn<span class="args">(self, msg)</span></span><span class="method inherited">(inherited from Command)</span><div class="method doc"></div></div><h3>Attributes</h3><div class="attr section"><span class="attr name">_nosetests__config</span><pre class="attr value">Default value: Config(addPaths=True, args=(), configSection=&#39;nosetests&#39;, debug=None, debugLog=None, env={}, exclude=None, files=[], getTestCaseNamesCompat=False, ignoreFiles=(&lt;_sre.SRE_Pattern object&gt;, &lt;_sre.SRE_Pattern object&gt;, &lt;_sre.SRE_Pattern object&gt;), include=None, includeExe=False, logStream=&lt;open file &#39;&lt;stderr&gt;&#39;, mode &#39;w&#39;&gt;, loggingConfig=None, options=&lt;nose.config.NoOptions object&gt;, parser=&lt;optparse.OptionParser instance&gt;, plugins=&lt;nose.plugins.manager.DefaultPluginManager object&gt;, runOnInit=True, srcDirs=(&#39;lib&#39;, &#39;src&#39;), stopOnError=False, stream=&lt;open file &#39;&lt;stderr&gt;&#39;, mode &#39;w&#39;&gt;, testMatch=&lt;_sre.SRE_Pattern object&gt;, testMatchPat=&#39;(?:^|[\\b_\\./-])[Tt]est&#39;, testNames=[], verbosity=1, where=(), workingDir=&#39;/home/jhp/code/nose/trunk&#39;)</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">_nosetests__parser</span><pre class="attr value">Default value: &lt;optparse.OptionParser instance&gt;</pre><div class="attr doc"></div></div><div class="attr section inherited"><span class="attr name">command_consumes_arguments</span><pre class="attr value">Default value: False</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">description</span><pre class="attr value">Default value: Run unit tests using nosetests</pre><div class="attr doc"></div></div><div class="attr section inherited"><span class="attr name">sub_commands</span><pre class="attr value">Default value: []</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">user_options</span><pre class="attr value">Default value: [(&#39;version&#39;, &#39;V&#39;, &#39;Output nose version and exit&#39;), (&#39;plugins&#39;, &#39;p&#39;, &#39;Output list of available plugins and exit. Combine with higher verbosity for greater detail&#39;), (&#39;verbosity=&#39;, None, &#39;Set verbosity; --verbosity=2 is the same as -v&#39;), (&#39;quiet=&#39;, &#39;q&#39;, &#39;&#39;), (&#39;config=&#39;, &#39;c&#39;, &#39;Load configuration from config file(s). May be specified multiple times; in that case, all config files will be loaded and combined&#39;), (&#39;where=&#39;, &#39;w&#39;, &#39;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]&#39;), (&#39;match=&#39;, &#39;m&#39;, &#39;Use this regular expression to find tests [NOSE_TESTMATCH]&#39;), (&#39;tests=&#39;, None, &#39;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.&#39;), (&#39;debug=&#39;, &#39;l&#39;, &#39;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.&#39;), (&#39;debug-log=&#39;, None, &#39;Log debug messages to this file (default: sys.stderr)&#39;), (&#39;logging-config=&#39;, None, &#39;Load logging config from this file -- bypasses all other logging config settings.&#39;), (&#39;exclude=&#39;, &#39;e&#39;, &quot;Don&#39;t run tests that match regular expression [NOSE_EXCLUDE]&quot;), (&#39;include=&#39;, &#39;i&#39;, &#39;Also run tests that match regular expression [NOSE_INCLUDE]&#39;), (&#39;stop&#39;, &#39;x&#39;, &#39;Stop running tests after the first error or failure&#39;), (&#39;no-path-adjustment=&#39;, &#39;P&#39;, &quot;Don&#39;t make any changes to sys.path when loading tests [NOSE_NOPATH]&quot;), (&#39;exe&#39;, None, &#39;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]&#39;), (&#39;noexe=&#39;, None, &#39;DO NOT look for tests in python modules that are executable. (The default on the windows platform is to do so.)&#39;), (&#39;attr=&#39;, &#39;a&#39;, &#39;Run only tests that have attributes specified by ATTR [NOSE_ATTR]&#39;), (&#39;eval-attr=&#39;, &#39;A&#39;, &#39;Run only tests for whose attributes the Python expression EXPR evaluates to True [NOSE_EVAL_ATTR]&#39;), (&#39;nocapture=&#39;, &#39;s&#39;, &quot;Don&#39;t capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE]&quot;), (&#39;with-coverage&#39;, None, &quot;Enable plugin Coverage: \nIf you have Ned Batchelder&#39;s coverage module installed, you may\nactivate a coverage report. The coverage report will cover any\npython source module imported after the start of the test run, excluding\nmodules that match testMatch. If you want to include those modules too,\nuse the --cover-tests switch, or set the NOSE_COVER_TESTS environment\nvariable to a true value. To restrict the coverage report to modules from\na particular package or packages, use the --cover-packages switch or the\nNOSE_COVER_PACKAGES environment variable.\n [NOSE_WITH_COVERAGE]&quot;), (&#39;cover-package=&#39;, None, &#39;Restrict coverage output to selected packages [NOSE_COVER_PACKAGE]&#39;), (&#39;cover-erase&#39;, None, &#39;Erase previously collected coverage statistics before run&#39;), (&#39;cover-tests&#39;, None, &#39;Include test modules in coverage report [NOSE_COVER_TESTS]&#39;), (&#39;cover-inclusive&#39;, None, &#39;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]&#39;), (&#39;pdb&#39;, None, &#39;Drop into debugger on errors&#39;), (&#39;pdb-failures&#39;, None, &#39;Drop into debugger on failures&#39;), (&#39;no-deprecated&#39;, None, &#39;Disable special handling of DeprecatedTest exceptions.&#39;), (&#39;with-doctest&#39;, None, &#39;Enable plugin Doctest: \nActivate doctest plugin to find and run doctests in non-test modules.\n [NOSE_WITH_DOCTEST]&#39;), (&#39;doctest-tests&#39;, None, &#39;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]&#39;), (&#39;doctest-extension=&#39;, None, &#39;Also look for doctests in files with this extension [NOSE_DOCTEST_EXTENSION]&#39;), (&#39;with-isolation&#39;, None, &#39;Enable plugin IsolationPlugin: \nActivate the isolation plugin to isolate changes to external\nmodules to a single test module or package. The isolation plugin\nresets the contents of sys.modules after each test module or\npackage runs to its state before the test. PLEASE NOTE that this\nplugin should not be used with the coverage plugin in any other case\nwhere module reloading may produce undesirable side-effects.\n [NOSE_WITH_ISOLATION]&#39;), (&#39;detailed-errors&#39;, &#39;d&#39;, &#39;Add detail to error output by attempting to evaluate failed asserts [NOSE_DETAILED_ERRORS]&#39;), (&#39;with-profile&#39;, None, &#39;Enable plugin Profile: \nUse this plugin to run tests using the hotshot profiler. \n [NOSE_WITH_PROFILE]&#39;), (&#39;profile-sort=&#39;, None, &#39;Set sort order for profiler output&#39;), (&#39;profile-stats-file=&#39;, None, &#39;Profiler stats file; default is a new temp file on each run&#39;), (&#39;profile-restrict=&#39;, None, &#39;Restrict profiler output. See help for pstats.Stats for details&#39;), (&#39;no-skip&#39;, None, &#39;Disable special handling of SkipTest exceptions.&#39;), (&#39;with-id&#39;, None, &quot;Enable plugin TestId: \nActivate to add a test id (like #1) to each test name output. After\nyou&#39;ve run once to generate test ids, you can re-run individual\ntests by activating the plugin and passing the ids (with or\nwithout the # prefix) instead of test names.\n [NOSE_WITH_ID]&quot;), (&#39;id-file=&#39;, None, &#39;Store test ids found in test runs in this file. Default is the file .noseids in the working directory.&#39;)]</pre><div class="attr doc"></div></div></div></div><h2>Functions</h2>
<a name="get_user_options"></a><div class="func section"><span class="func name">get_user_options<span class="args">(parser)</span></span><div class="func doc"><p>convert a optparse option list into a distutils option tuple list</p>
</div></div><h2>Attributes</h2>
<a name="option_blacklist"></a><div class="attr section"><span class="attr name">option_blacklist</span><pre class="attr value">Default value: [&#39;help&#39;, &#39;verbose&#39;]</pre><div class="attr doc"></div></div>
diff --git a/doc/module_nose.config.html b/doc/module_nose.config.html
index 5de1c09..af630e0 100644
--- a/doc/module_nose.config.html
+++ b/doc/module_nose.config.html
@@ -6,17 +6,20 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
- <h2>Classes</h2><ul><li><a href="#NoPlugins">NoPlugins</a></li><li><a href="#Config">Config</a></li></ul><h2>Functions</h2><ul><li><a href="#user_config_files">user_config_files</a></li><li><a href="#flag">flag</a></li><li><a href="#all_config_files">all_config_files</a></li></ul><h2>Attributes</h2><ul><li><a href="#option_blacklist">option_blacklist</a></li><li><a href="#log">log</a></li><li><a href="#config_files">config_files</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+ <h2>Classes</h2><ul><li><a href="#NoOptions">NoOptions</a></li><li><a href="#NoPlugins">NoPlugins</a></li><li><a href="#Config">Config</a></li></ul><h2>Functions</h2><ul><li><a href="#user_config_files">user_config_files</a></li><li><a href="#flag">flag</a></li><li><a href="#all_config_files">all_config_files</a></li></ul><h2>Attributes</h2><ul><li><a href="#option_blacklist">option_blacklist</a></li><li><a href="#log">log</a></li><li><a href="#config_files">config_files</a></li></ul>
</div>
<div id="main">
<h1>nose: nose.config</h1>
<h2>Classes</h2>
-<p>Highlighted methods are defined in this class.</p><a name="NoPlugins"></a><div class="cls section"><span class="cls name">NoPlugins</span> (object)<div class="cls doc"><p>Plugin 'manager' that includes no plugins and returns None
+<p>Highlighted methods are defined in this class.</p><a name="NoOptions"></a><div class="cls section"><span class="cls name">NoOptions</span> (object)<div class="cls doc"><p>Options container that returns None for all options.</p>
+<h3>Methods</h3><div class="method section inherited"><span class="method name">__init__<span class="args">(...)</span></span><span class="method inherited">(inherited from object)</span><div class="method doc"><p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p>
+</div></div><div class="method section"><span class="method name">__nonzero__<span class="args">(self)</span></span><div class="method doc"></div></div></div></div>
+<a name="NoPlugins"></a><div class="cls section"><span class="cls name">NoPlugins</span> (object)<div class="cls doc"><p>Plugin 'manager' that includes no plugins and returns None
for all calls</p>
<h3>Methods</h3><div class="method section"><span class="method name">__call__<span class="args">(self, *arg, **kw)</span></span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">__init__<span class="args">(...)</span></span><span class="method inherited">(inherited from object)</span><div class="method doc"><p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p>
</div></div></div></div>
@@ -25,7 +28,7 @@ for all calls</p>
behavior, including plugin lists. Here are the default values for
all config keys:</p>
<pre class="literal-block">
-self.env = env = kw.pop('env', os.environ)
+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)
@@ -43,7 +46,7 @@ self.ignoreFiles = (re.compile(r'^\.'),
self.include = None
self.loggingConfig = None
self.logStream = sys.stderr
-self.options = ()
+self.options = NoOptions()
self.parser = None
self.plugins = NoPlugins()
self.srcDirs = ('lib', 'src')
diff --git a/doc/module_nose.core.html b/doc/module_nose.core.html
index 7f71976..9a9a579 100644
--- a/doc/module_nose.core.html
+++ b/doc/module_nose.core.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#TestProgram">TestProgram</a></li><li><a href="#main">main</a></li><li><a href="#run_exit">run_exit</a></li><li><a href="#TextTestRunner">TextTestRunner</a></li><li><a href="#TestCollector">TestCollector</a></li><li><a href="#defaultTestCollector">defaultTestCollector</a></li></ul><h2>Functions</h2><ul><li><a href="#collector">collector</a></li><li><a href="#runmodule">runmodule</a></li><li><a href="#run">run</a></li></ul>
</div>
@@ -70,10 +70,12 @@ in the options below.</p>
</div>
<div class="section">
<h1><a id="configuration" name="configuration">Configuration</a></h1>
-<p>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 -- prefix removed:</p>
+<p>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:</p>
<blockquote>
[nosetests]
verbosity=3
@@ -91,6 +93,9 @@ run:</p>
nosetests --plugins</blockquote>
<p>You can add -v or -vv to that command to show more information
about each plugin.</p>
+<p>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.</p>
</div>
<div class="section">
<h1><a id="plugins" name="plugins">0.9 plugins</a></h1>
@@ -105,10 +110,33 @@ 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
that no longer exists.</p>
</div>
-<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, module=None, defaultTest='.', argv=None, testRunner=None, testLoader=None, env=None, config=None, suite=None, exit=True)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">createTests<span class="args">(self)</span></span><div class="method doc"><p>Create the tests to run. Default behavior is to discover
-tests using TestCollector using nose.loader.TestLoader as the
+<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, module=None, defaultTest='.', argv=None, testRunner=None, testLoader=None, env=None, config=None, suite=None, exit=True, plugins=None)</span></span><div class="method doc"><p>Collect and run tests, returning success or failure.</p>
+<p>The arguments to __init__ are the same as to <cite>main()</cite> and <cite>run()</cite>:</p>
+<ul class="simple">
+<li>module: All tests are in this module (default: None)</li>
+<li>defaultTest: Tests to load (default: '.')</li>
+<li>argv: Command line arguments (default: None; sys.argv is read)</li>
+<li>testRunner: Test runner instance (default: None)</li>
+<li>testLoader: Test loader instance (default: None)</li>
+<li>env: Environment; ignored if config is provided (default: None;
+os.environ is read)</li>
+<li>config: <a class="reference" href="module_nose.config.html#Config">nose.config.Config</a> instance (default: None)</li>
+<li>suite: Suite or list of tests to run (default: None). Passing a
+suite or lists of tests will bypass all test discovery and
+loading. <em>ALSO NOTE</em> that if you pass a unittest.TestSuite
+instance as the suite, context fixtures at the class, module and
+package level will not be used, and many plugin hooks will not
+be called. If you want normal nose behavior, either pass a list
+of tests, or a fully-configured <a class="reference" href="module_nose.suite.html#ContextSuite">nose.suite.ContextSuite</a>.</li>
+<li>exit: Exit after running tests and printing report (default: True)</li>
+<li>plugins: List of plugins to use; ignored if config is provided
+(default: load plugins with DefaultPluginManager)</li>
+</ul>
+</div></div><div class="method section"><span class="method name">createTests<span class="args">(self)</span></span><div class="method doc"><p>Create the tests to run. If a self.suite
+is set, then that suite will be used. Otherwise, tests will be
+loaded from the given test names (self.testNames) using the
test loader.</p>
-</div></div><div class="method section"><span class="method name">makeConfig<span class="args">(self, env)</span></span><div class="method doc"><p>Load a Config, pre-filled with user config files if any are
+</div></div><div class="method section"><span class="method name">makeConfig<span class="args">(self, env, plugins=None)</span></span><div class="method doc"><p>Load a Config, pre-filled with user config files if any are
found.</p>
</div></div><div class="method section"><span class="method name">parseArgs<span class="args">(self, argv)</span></span><div class="method doc"><p>Parse argv and env and configure running environment.</p>
</div></div><div class="method section"><span class="method name">runTests<span class="args">(self)</span></span><div class="method doc"><p>Run Tests. Returns true on success, false on failure, and sets
@@ -133,7 +161,7 @@ Examples:
<a name="TextTestRunner"></a><div class="cls section"><span class="cls name">TextTestRunner</span> (unittest.TextTestRunner)<div class="cls doc"><p>Test runner that uses nose's TextTestResult to enable errorClasses,
as well as providing hooks for plugins to override or replace the test
output stream, results, and the test case itself.</p>
-<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, stream=<open file '<stderr>', mode 'w' at 0x2ade7b1fe210>, descriptions=1, verbosity=1, config=None)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_makeResult<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">run<span class="args">(self, test)</span></span><div class="method doc"><p>Overrides to provide plugin hooks and defer all output to
+<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, stream=<open file '<stderr>', mode 'w' at 0x2b3193410210>, descriptions=1, verbosity=1, config=None)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_makeResult<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">run<span class="args">(self, test)</span></span><div class="method doc"><p>Overrides to provide plugin hooks and defer all output to
the test result class.</p>
</div></div></div></div>
<a name="TestCollector"></a><div class="cls section"><span class="cls name">TestCollector</span> ()<div class="cls doc"><p>Main nose test collector.</p>
@@ -164,9 +192,18 @@ as keyword arguments.</p>
<li>argv: Command line arguments (default: None; sys.argv is read)</li>
<li>testRunner: Test runner instance (default: None)</li>
<li>testLoader: Test loader instance (default: None)</li>
-<li>env: Environment (default: None; os.environ is read)</li>
-<li>config: nose.config.Config instance (default: None)</li>
-<li>suite: Suite of tests to run (default: None)</li>
+<li>env: Environment; ignored if config is provided (default: None;
+os.environ is read)</li>
+<li>config: <a class="reference" href="module_nose.config.html#Config">nose.config.Config</a> instance (default: None)</li>
+<li>suite: Suite or list of tests to run (default: None). Passing a
+suite or lists of tests will bypass all test discovery and
+loading. <em>ALSO NOTE</em> that if you pass a unittest.TestSuite
+instance as the suite, context fixtures at the class, module and
+package level will not be used, and many plugin hooks will not
+be called. If you want normal nose behavior, either pass a list
+of tests, or a fully-configured <a class="reference" href="module_nose.suite.html#ContextSuite">nose.suite.ContextSuite</a>.</li>
+<li>plugins: List of plugins to use; ignored if config is provided
+(default: load plugins with DefaultPluginManager)</li>
</ul>
<p>With the exception that the <tt class="docutils literal"><span class="pre">exit</span></tt> argument is always set
to False.</p>
diff --git a/doc/module_nose.exc.html b/doc/module_nose.exc.html
index e381587..58c7485 100644
--- a/doc/module_nose.exc.html
+++ b/doc/module_nose.exc.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
diff --git a/doc/module_nose.importer.html b/doc/module_nose.importer.html
index 2e677d0..48bcf7c 100644
--- a/doc/module_nose.importer.html
+++ b/doc/module_nose.importer.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#Importer">Importer</a></li></ul><h2>Functions</h2><ul><li><a href="#add_path">add_path</a></li><li><a href="#remove_path">remove_path</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li></ul>
</div>
diff --git a/doc/module_nose.inspector.html b/doc/module_nose.inspector.html
index 292d3a3..38f2ed1 100644
--- a/doc/module_nose.inspector.html
+++ b/doc/module_nose.inspector.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#Expander">Expander</a></li></ul><h2>Functions</h2><ul><li><a href="#inspect_traceback">inspect_traceback</a></li><li><a href="#find_inspectable_lines">find_inspectable_lines</a></li><li><a href="#tbsource">tbsource</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li></ul>
</div>
diff --git a/doc/module_nose.loader.html b/doc/module_nose.loader.html
index 0cf5c94..f9d7a89 100644
--- a/doc/module_nose.loader.html
+++ b/doc/module_nose.loader.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#TestLoader">TestLoader</a></li><li><a href="#defaultTestLoader">defaultTestLoader</a></li></ul>
</div>
@@ -31,7 +31,7 @@ unittest.TestCase subclasses</li>
<p>Parameters (all optional):</p>
<ul class="simple">
<li>config: provide a <a class="reference" href="module_nose.config.html#Config">nose.config.Config</a> or other config class
-instance; if not provided a <cite>nose.config.Config</cite> with
+instance; if not provided a <a class="reference" href="module_nose.config.html#Config">nose.config.Config</a> with
default values is used.</li>
<li>importer: provide an importer instance that implements
<cite>importFromPath</cite>. If not provided, a
@@ -39,8 +39,10 @@ default values is used.</li>
<li>workingDir: the directory to which file and module names are
relative. If not provided, assumed to be the current working
directory.</li>
-<li>selector: a selector class. If not provided, a
-<a class="reference" href="module_nose.selector.html#Selector">nose.selector.Selector</a> is used.</li>
+<li>selector: a selector class or instance. If a class is
+provided, it will be instantiated with one argument, the
+current config. If not provided, a <a class="reference" href="module_nose.selector.html#Selector">nose.selector.Selector</a>
+is used.</li>
</ul>
</div></div><div class="method section"><span class="method name">getTestCaseNames<span class="args">(self, testCaseClass)</span></span><div class="method doc"><p>Override to select with selector, unless
config.getTestCaseNamesCompat is True</p>
diff --git a/doc/module_nose.plugins.manager.html b/doc/module_nose.plugins.manager.html
index 3b2ebfa..2cf215d 100644
--- a/doc/module_nose.plugins.manager.html
+++ b/doc/module_nose.plugins.manager.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#DefaultPluginManager">DefaultPluginManager</a></li><li><a href="#PluginManager">PluginManager</a></li><li><a href="#EntryPointPluginManager">EntryPointPluginManager</a></li><li><a href="#BuiltinPluginManager">BuiltinPluginManager</a></li><li><a href="#RestrictedPluginManager">RestrictedPluginManager</a></li><li><a href="#PluginProxy">PluginProxy</a></li><li><a href="#ZeroNinePlugin">ZeroNinePlugin</a></li></ul>
</div>
diff --git a/doc/module_nose.plugins.plugintest.html b/doc/module_nose.plugins.plugintest.html
new file mode 100644
index 0000000..15d162d
--- /dev/null
+++ b/doc/module_nose.plugins.plugintest.html
@@ -0,0 +1,99 @@
+<html>
+ <head>
+ <title>nose: nose.plugins.plugintest</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+ <h2>Classes</h2><ul><li><a href="#PluginTester">PluginTester</a></li><li><a href="#AccessDecorator">AccessDecorator</a></li></ul><h2>Functions</h2><ul><li><a href="#run">run</a></li></ul>
+ </div>
+
+ <div id="main">
+ <h1>nose: nose.plugins.plugintest</h1>
+
+ <p>Utilities for testing plugins.</p>
+<h2>Classes</h2>
+<p>Highlighted methods are defined in this class.</p><a name="PluginTester"></a><div class="cls section"><span class="cls name">PluginTester</span> (object)<div class="cls doc"><p>A mixin for testing nose plugins in their runtime environment.</p>
+<p>Subclass this and mix in unittest.TestCase to run integration/functional
+tests on your plugin. When setUp() is called, the stub test suite is
+executed with your plugin so that during an actual test you can inspect the
+artifacts of how your plugin interacted with the stub test suite.</p>
+<div class="section">
+<h1><a id="class-variables" name="class-variables">Class Variables</a></h1>
+<ul class="simple">
+<li>activate<ul>
+<li>the argument to send nosetests to activate the plugin</li>
+</ul>
+</li>
+<li>suitepath<ul>
+<li>if set, this is the path of the suite to test. otherwise, you
+will need to use the hook, makeSuite()</li>
+</ul>
+</li>
+<li>plugins<ul>
+<li>the list of plugins to make available during the run. Note
+that this does not mean these plugins will be <em>enabled</em> during
+the run -- only the plugins enabled by the activate argument
+or other settings in argv or env will be enabled.</li>
+</ul>
+</li>
+<li>args<ul>
+<li>a list of arguments to add to the nosetests command, in addition to
+the activate argument</li>
+</ul>
+</li>
+<li>env<ul>
+<li>optional dict of environment variables to send nosetests</li>
+</ul>
+</li>
+</ul>
+</div>
+<h3>Methods</h3><div class="method section inherited"><span class="method name">__init__<span class="args">(...)</span></span><span class="method inherited">(inherited from object)</span><div class="method doc"><p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p>
+</div></div><div class="method section"><span class="method name">_execPlugin<span class="args">(self)</span></span><div class="method doc"><p>execute the plugin on the internal test suite.</p>
+</div></div><div class="method section"><span class="method name">makeSuite<span class="args">(self)</span></span><div class="method doc"><p>returns a suite object of tests to run (unittest.TestSuite())</p>
+<p>If self.suitepath is None, this must be implemented. The returned suite
+object will be executed with all plugins activated. It may return
+None.</p>
+<p>Here is an example of a basic suite object you can return</p>
+<pre class="literal-block">
+&gt;&gt;&gt; import unittest
+&gt;&gt;&gt; class SomeTest(unittest.TestCase):
+... def runTest(self):
+... raise ValueError(&quot;Now do something, plugin!&quot;)
+...
+&gt;&gt;&gt; unittest.TestSuite([SomeTest()]) # doctest: +ELLIPSIS
+&lt;unittest.TestSuite tests=[&lt;...SomeTest testMethod=runTest&gt;]&gt;
+</pre>
+</div></div><div class="method section"><span class="method name">setUp<span class="args">(self)</span></span><div class="method doc"><p>runs nosetests with the specified test suite, all plugins
+activated.</p>
+</div></div><h3>Attributes</h3><div class="attr section"><span class="attr name">activate</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">args</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">argv</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">env</span><pre class="attr value">Default value: {}</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">plugins</span><pre class="attr value">Default value: []</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">suitepath</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div></div></div>
+<a name="AccessDecorator"></a><div class="cls section"><span class="cls name">AccessDecorator</span> (object)<div class="cls doc"><h3>Methods</h3><div class="method section"><span class="method name">__contains__<span class="args">(self, val)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">__init__<span class="args">(self, stream)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">__iter__<span class="args">(self)</span></span><div class="method doc"></div></div><h3>Attributes</h3><div class="attr section"><span class="attr name">_buf</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div><div class="attr section"><span class="attr name">stream</span><pre class="attr value">Default value: None</pre><div class="attr doc"></div></div></div></div><h2>Functions</h2>
+<a name="run"></a><div class="func section"><span class="func name">run<span class="args">(*arg, **kw)</span></span><div class="func doc"><p>Specialized version of nose.run for use inside of doctests that
+test test runs.</p>
+<p>This version of run() prints the result output to stdout. Before
+printing, the output is processed by replacing the timing
+information with an ellipsis (...), removing traceback stacks, and
+removing trailing whitespace.</p>
+<p>Use this version of run wherever you are writing a doctest that
+tests nose (or unittest) test result output.</p>
+<p>Note: do not use doctest: +ELLIPSIS when testing nose output,
+since ellipses (&quot;test_foo ... ok&quot;) in your expected test runner
+output may match multiple lines of output, causing spurious test
+passes!</p>
+</div></div>
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/module_nose.proxy.html b/doc/module_nose.proxy.html
index fc9ca7f..e1098d2 100644
--- a/doc/module_nose.proxy.html
+++ b/doc/module_nose.proxy.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#ResultProxyFactory">ResultProxyFactory</a></li><li><a href="#ResultProxy">ResultProxy</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li></ul>
</div>
diff --git a/doc/module_nose.result.html b/doc/module_nose.result.html
index 77f9b93..d62318b 100644
--- a/doc/module_nose.result.html
+++ b/doc/module_nose.result.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#TextTestResult">TextTestResult</a></li></ul><h2>Functions</h2><ul><li><a href="#ln">ln</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li></ul>
</div>
diff --git a/doc/module_nose.selector.html b/doc/module_nose.selector.html
index b2d4828..f84a2dd 100644
--- a/doc/module_nose.selector.html
+++ b/doc/module_nose.selector.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#Selector">Selector</a></li><li><a href="#defaultSelector">defaultSelector</a></li><li><a href="#TestAddress">TestAddress</a></li></ul>
</div>
diff --git a/doc/module_nose.suite.html b/doc/module_nose.suite.html
index f37a059..857ae20 100644
--- a/doc/module_nose.suite.html
+++ b/doc/module_nose.suite.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#FinalizingSuiteWrapper">FinalizingSuiteWrapper</a></li><li><a href="#ContextSuite">ContextSuite</a></li><li><a href="#ContextSuiteFactory">ContextSuiteFactory</a></li><li><a href="#TestModule">TestModule</a></li><li><a href="#ContextList">ContextList</a></li><li><a href="#LazySuite">LazySuite</a></li><li><a href="#MixedContextError">MixedContextError</a></li><li><a href="#TestDir">TestDir</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li><li><a href="#generators">generators</a></li></ul>
</div>
@@ -49,7 +49,7 @@ iterable. In that case the tests will wrapped in
nose.case.Test, be examined and the context of each found and a
suite of suites returned, organized into a stack with the
outermost suites belonging to the outermost contexts.</p>
-</div></div><div class="method section"><span class="method name">__init__<span class="args">(self, config=None, suiteClass=None, resultProxy=<object object at 0x2ade7b245050>)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">ancestry<span class="args">(self, context)</span></span><div class="method doc"><p>Return the ancestry of the context (that is, all of the
+</div></div><div class="method section"><span class="method name">__init__<span class="args">(self, config=None, suiteClass=None, resultProxy=<object object at 0x2b3193457050>)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">ancestry<span class="args">(self, context)</span></span><div class="method doc"><p>Return the ancestry of the context (that is, all of the
packages and modules containing the context), in order of
descent with the outermost ancestor last.
This method is a generator.</p>
diff --git a/doc/module_nose.tools.html b/doc/module_nose.tools.html
index a7d37d1..3666870 100644
--- a/doc/module_nose.tools.html
+++ b/doc/module_nose.tools.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#TimeExpired">TimeExpired</a></li></ul><h2>Functions</h2><ul><li><a href="#assert_true">assert_true</a></li><li><a href="#assert_equal">assert_equal</a></li><li><a href="#eq_">eq_</a></li><li><a href="#set_trace">set_trace</a></li><li><a href="#assert_almost_equals">assert_almost_equals</a></li><li><a href="#assert_equals">assert_equals</a></li><li><a href="#raises">raises</a></li><li><a href="#make_decorator">make_decorator</a></li><li><a href="#with_setup">with_setup</a></li><li><a href="#assert_almost_equal">assert_almost_equal</a></li><li><a href="#assert_not_equal">assert_not_equal</a></li><li><a href="#assert_not_almost_equals">assert_not_almost_equals</a></li><li><a href="#assert_not_equals">assert_not_equals</a></li><li><a href="#assert_raises">assert_raises</a></li><li><a href="#ok_">ok_</a></li><li><a href="#timed">timed</a></li><li><a href="#assert_not_almost_equal">assert_not_almost_equal</a></li><li><a href="#assert_false">assert_false</a></li></ul>
</div>
diff --git a/doc/module_nose.twistedtools.html b/doc/module_nose.twistedtools.html
index 45c3971..68ed7f9 100644
--- a/doc/module_nose.twistedtools.html
+++ b/doc/module_nose.twistedtools.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Functions</h2><ul><li><a href="#deferred">deferred</a></li><li><a href="#stop_reactor">stop_reactor</a></li><li><a href="#threaded_reactor">threaded_reactor</a></li></ul><h2>Attributes</h2><ul><li><a href="#reactor">reactor</a></li></ul>
</div>
diff --git a/doc/module_nose.util.html b/doc/module_nose.util.html
index 638146f..56671cd 100644
--- a/doc/module_nose.util.html
+++ b/doc/module_nose.util.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>Classes</h2><ul><li><a href="#odict">odict</a></li></ul><h2>Functions</h2><ul><li><a href="#absfile">absfile</a></li><li><a href="#tolist">tolist</a></li><li><a href="#try_run">try_run</a></li><li><a href="#split_test_name">split_test_name</a></li><li><a href="#func_lineno">func_lineno</a></li><li><a href="#match_last">match_last</a></li><li><a href="#file_like">file_like</a></li><li><a href="#ln">ln</a></li><li><a href="#is_generator">is_generator</a></li><li><a href="#absdir">absdir</a></li><li><a href="#isgenerator">isgenerator</a></li><li><a href="#anyp">anyp</a></li><li><a href="#test_address">test_address</a></li><li><a href="#getfilename">getfilename</a></li><li><a href="#isclass">isclass</a></li><li><a href="#resolve_name">resolve_name</a></li><li><a href="#src">src</a></li><li><a href="#ispackage">ispackage</a></li><li><a href="#getpackage">getpackage</a></li><li><a href="#cmp_lineno">cmp_lineno</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li><li><a href="#class_types">class_types</a></li><li><a href="#CO_GENERATOR">CO_GENERATOR</a></li><li><a href="#ident_re">ident_re</a></li></ul>
</div>
@@ -65,25 +65,23 @@ compat_co_firstlineno, then func_code.co_first_lineno.</p>
</div></div>
<a name="match_last"></a><div class="func section"><span class="func name">match_last<span class="args">(a, b, regex)</span></span><div class="func doc"><p>Sort compare function that puts items that match a
regular expression last.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; from nose.config import Config
-&gt;&gt;&gt; c = Config()
-&gt;&gt;&gt; regex = c.testMatch
-&gt;&gt;&gt; entries = ['.', '..', 'a_test', 'src', 'lib', 'test', 'foo.py']
-&gt;&gt;&gt; entries.sort(lambda a, b: match_last(a, b, regex))
-&gt;&gt;&gt; entries
-['.', '..', 'foo.py', 'lib', 'src', 'a_test', 'test']
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.config</span> <span class="k">import</span> <span class="n">Config</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Config</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">regex</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">testMatch</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">entries</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;.&#39;</span><span class="p">,</span> <span class="s">&#39;..&#39;</span><span class="p">,</span> <span class="s">&#39;a_test&#39;</span><span class="p">,</span> <span class="s">&#39;src&#39;</span><span class="p">,</span> <span class="s">&#39;lib&#39;</span><span class="p">,</span> <span class="s">&#39;test&#39;</span><span class="p">,</span> <span class="s">&#39;foo.py&#39;</span><span class="p">]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">entries</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="k">lambda</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">:</span> <span class="n">match_last</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">regex</span><span class="p">))</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">entries</span>
+<span class="go">[&#39;.&#39;, &#39;..&#39;, &#39;foo.py&#39;, &#39;lib&#39;, &#39;src&#39;, &#39;a_test&#39;, &#39;test&#39;]</span>
+</pre></div>
</div></div>
<a name="file_like"></a><div class="func section"><span class="func name">file_like<span class="args">(name)</span></span><div class="func doc"><p>A name is file-like if it is a path that exists, or it has a
directory part, or it ends in .py, or it isn't a legal python
identifier.</p>
</div></div>
<a name="ln"></a><div class="func section"><span class="func name">ln<span class="args">(label)</span></span><div class="func doc"><p>Draw a 70-char-wide divider, with label in the middle.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; ln('hello there')
-'---------------------------- hello there -----------------------------'
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">ln</span><span class="p">(</span><span class="s">&#39;hello there&#39;</span><span class="p">)</span>
+<span class="go">&#39;---------------------------- hello there -----------------------------&#39;</span>
+</pre></div>
</div></div>
<a name="is_generator"></a><div class="func section"><span class="func name">is_generator<span class="args">(func)</span></span><div class="func doc"></div></div>
<a name="absdir"></a><div class="func section"><span class="func name">absdir<span class="args">(path)</span></span><div class="func doc"><p>Return absolute, normalized path to directory, if it exists; None
@@ -103,66 +101,59 @@ for objects that can't be subclasses of anything.</p>
</div></div>
<a name="resolve_name"></a><div class="func section"><span class="func name">resolve_name<span class="args">(name, module=None)</span></span><div class="func doc"><p>Resolve a dotted name to a module and its parts. This is stolen
wholesale from unittest.TestLoader.loadTestByName.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; resolve_name('nose.util') #doctest: +ELLIPSIS
-&lt;module 'nose.util' from...&gt;
-&gt;&gt;&gt; resolve_name('nose.util.resolve_name') #doctest: +ELLIPSIS
-&lt;function resolve_name at...&gt;
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">resolve_name</span><span class="p">(</span><span class="s">&#39;nose.util&#39;</span><span class="p">)</span> <span class="c">#doctest: +ELLIPSIS</span>
+<span class="go">&lt;module &#39;nose.util&#39; from...&gt;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">resolve_name</span><span class="p">(</span><span class="s">&#39;nose.util.resolve_name&#39;</span><span class="p">)</span> <span class="c">#doctest: +ELLIPSIS</span>
+<span class="go">&lt;function resolve_name at...&gt;</span>
+</pre></div>
</div></div>
<a name="src"></a><div class="func section"><span class="func name">src<span class="args">(filename)</span></span><div class="func doc"><p>Find the python source file for a .pyc or .pyo file. Returns the
filename provided if it is not a python source file.</p>
</div></div>
<a name="ispackage"></a><div class="func section"><span class="func name">ispackage<span class="args">(path)</span></span><div class="func doc"><p>Is this path a package directory?</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; ispackage('nose')
-True
-&gt;&gt;&gt; ispackage('unit_tests')
-False
-&gt;&gt;&gt; ispackage('nose/plugins')
-True
-&gt;&gt;&gt; ispackage('nose/loader.py')
-False
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">ispackage</span><span class="p">(</span><span class="s">&#39;nose&#39;</span><span class="p">)</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">ispackage</span><span class="p">(</span><span class="s">&#39;unit_tests&#39;</span><span class="p">)</span>
+<span class="go">False</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">ispackage</span><span class="p">(</span><span class="s">&#39;nose/plugins&#39;</span><span class="p">)</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">ispackage</span><span class="p">(</span><span class="s">&#39;nose/loader.py&#39;</span><span class="p">)</span>
+<span class="go">False</span>
+</pre></div>
</div></div>
<a name="getpackage"></a><div class="func section"><span class="func name">getpackage<span class="args">(filename)</span></span><div class="func doc"><p>Find the full dotted package name for a given python source file
name. Returns None if the file is not a python source file.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; getpackage('foo.py')
-'foo'
-&gt;&gt;&gt; getpackage('biff/baf.py')
-'baf'
-&gt;&gt;&gt; getpackage('nose/util.py')
-'nose.util'
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;foo.py&#39;</span><span class="p">)</span>
+<span class="go">&#39;foo&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;biff/baf.py&#39;</span><span class="p">)</span>
+<span class="go">&#39;baf&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;nose/util.py&#39;</span><span class="p">)</span>
+<span class="go">&#39;nose.util&#39;</span>
+</pre></div>
<p>Works for directories too.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; getpackage('nose')
-'nose'
-&gt;&gt;&gt; getpackage('nose/plugins')
-'nose.plugins'
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;nose&#39;</span><span class="p">)</span>
+<span class="go">&#39;nose&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;nose/plugins&#39;</span><span class="p">)</span>
+<span class="go">&#39;nose.plugins&#39;</span>
+</pre></div>
<p>And __init__ files stuck onto directories</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; getpackage('nose/plugins/__init__.py')
-'nose.plugins'
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="s">&#39;nose/plugins/__init__.py&#39;</span><span class="p">)</span>
+<span class="go">&#39;nose.plugins&#39;</span>
+</pre></div>
<p>Absolute paths also work.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; path = os.path.abspath(os.path.join('nose', 'plugins'))
-&gt;&gt;&gt; getpackage(path)
-'nose.plugins'
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;nose&#39;</span><span class="p">,</span> <span class="s">&#39;plugins&#39;</span><span class="p">))</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">getpackage</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+<span class="go">&#39;nose.plugins&#39;</span>
+</pre></div>
</div></div>
<a name="cmp_lineno"></a><div class="func section"><span class="func name">cmp_lineno<span class="args">(a, b)</span></span><div class="func doc"><p>Compare functions by their line numbers.</p>
-<pre class="doctest-block">
-&gt;&gt;&gt; cmp_lineno(isgenerator, ispackage)
--1
-&gt;&gt;&gt; cmp_lineno(ispackage, isgenerator)
-1
-&gt;&gt;&gt; cmp_lineno(isgenerator, isgenerator)
-0
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">cmp_lineno</span><span class="p">(</span><span class="n">isgenerator</span><span class="p">,</span> <span class="n">ispackage</span><span class="p">)</span>
+<span class="go">-1</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">cmp_lineno</span><span class="p">(</span><span class="n">ispackage</span><span class="p">,</span> <span class="n">isgenerator</span><span class="p">)</span>
+<span class="go">1</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">cmp_lineno</span><span class="p">(</span><span class="n">isgenerator</span><span class="p">,</span> <span class="n">isgenerator</span><span class="p">)</span>
+<span class="go">0</span>
+</pre></div>
</div></div><h2>Attributes</h2>
<a name="log"></a><div class="attr section"><span class="attr name">log</span><pre class="attr value">Default value: &lt;logging.Logger instance&gt;</pre><div class="attr doc"></div></div>
<a name="class_types"></a><div class="attr section"><span class="attr name">class_types</span><pre class="attr value">Default value: (&lt;type &#39;classobj&#39;&gt;, &lt;type &#39;type&#39;&gt;)</pre><div class="attr doc"></div></div>
diff --git a/doc/plugin_attrib.html b/doc/plugin_attrib.html
index 30c66e2..5f938db 100644
--- a/doc/plugin_attrib.html
+++ b/doc/plugin_attrib.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
@@ -117,7 +117,6 @@ below for definition)</p>
<span class="sd">&quot;&quot;&quot;</span>
<span class="k">import</span> <span class="nn">logging</span>
<span class="k">import</span> <span class="nn">os</span>
-<span class="k">import</span> <span class="nn">re</span>
<span class="k">import</span> <span class="nn">sys</span>
<span class="k">from</span> <span class="nn">inspect</span> <span class="k">import</span> <span class="n">isfunction</span>
<span class="k">from</span> <span class="nn">nose.plugins.base</span> <span class="k">import</span> <span class="n">Plugin</span>
diff --git a/doc/plugin_capture.html b/doc/plugin_capture.html
index 16265f2..c3e5e95 100644
--- a/doc/plugin_capture.html
+++ b/doc/plugin_capture.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_cover.html b/doc/plugin_cover.html
index 6f6031e..30c8059 100644
--- a/doc/plugin_cover.html
+++ b/doc/plugin_cover.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_debug.html b/doc/plugin_debug.html
index aedb885..eb57332 100644
--- a/doc/plugin_debug.html
+++ b/doc/plugin_debug.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_deprecated.html b/doc/plugin_deprecated.html
index 076ce27..cb1f068 100644
--- a/doc/plugin_deprecated.html
+++ b/doc/plugin_deprecated.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_doctests.html b/doc/plugin_doctests.html
index 8a3bfc5..5ddee37 100644
--- a/doc/plugin_doctests.html
+++ b/doc/plugin_doctests.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
@@ -26,6 +26,8 @@ indicate which file extension(s) to load.</p>
<p>doctest tests are run like any other test, with the exception that output
capture does not work, because doctest does its own output capture in the
course of running a test.</p>
+<p>This module also includes a specialized version of nose.run() that
+makes it easier to write doctests that test test runs.</p>
<h2>Plugin Methods Implemented</h2>
@@ -43,7 +45,9 @@ course of running a test.</p>
--with-doctest Enable plugin Doctest: Activate doctest plugin to
find and run doctests in non-test modules.
[NOSE_WITH_DOCTEST]
- --doctest-tests Also look for doctests in test modules
+ --doctest-tests 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]
--doctest-extension=DOCTESTEXTENSION
Also look for doctests in files with this extension
@@ -66,6 +70,9 @@ course of running a test.</p>
<span class="sd">capture does not work, because doctest does its own output capture in the</span>
<span class="sd">course of running a test.</span>
+<span class="sd">This module also includes a specialized version of nose.run() that</span>
+<span class="sd">makes it easier to write doctests that test test runs.</span>
+
<span class="sd">.. _doctest: http://docs.python.org/lib/module-doctest.html</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="k">from</span> <span class="nn">__future__</span> <span class="k">import</span> <span class="n">generators</span>
@@ -75,6 +82,10 @@ course of running a test.</p>
<span class="k">from</span> <span class="nn">inspect</span> <span class="k">import</span> <span class="n">getmodule</span>
<span class="k">from</span> <span class="nn">nose.plugins.base</span> <span class="k">import</span> <span class="n">Plugin</span>
<span class="k">from</span> <span class="nn">nose.util</span> <span class="k">import</span> <span class="n">anyp</span><span class="p">,</span> <span class="n">getpackage</span><span class="p">,</span> <span class="n">test_address</span><span class="p">,</span> <span class="n">resolve_name</span><span class="p">,</span> <span class="n">tolist</span>
+<span class="k">try</span><span class="p">:</span>
+ <span class="k">from</span> <span class="nn">cStringIO</span> <span class="k">import</span> <span class="n">StringIO</span>
+<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
+ <span class="k">from</span> <span class="nn">StringIO</span> <span class="k">import</span> <span class="n">StringIO</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span>
@@ -86,6 +97,7 @@ course of running a test.</p>
<span class="c"># system version is too old</span>
<span class="k">import</span> <span class="nn">nose.ext.dtcompat</span> <span class="k">as</span> <span class="nn">doctest</span>
+
<span class="c">#</span>
<span class="c"># Doctest and coverage don&#39;t get along, so we need to create</span>
<span class="c"># a monkeypatch that will replace the part of doctest that</span>
@@ -124,8 +136,10 @@ course of running a test.</p>
<span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--doctest-tests&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s">&#39;doctest_tests&#39;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;NOSE_DOCTEST_TESTS&#39;</span><span class="p">),</span>
- <span class="n">help</span><span class="o">=</span><span class="s">&quot;Also look for doctests in test modules &quot;</span>
- <span class="s">&quot;[NOSE_DOCTEST_TESTS]&quot;</span><span class="p">)</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Also look for doctests in test modules. &quot;</span>
+ <span class="s">&quot;Note that classes, methods and functions should &quot;</span>
+ <span class="s">&quot;have either doctests or non-doctest tests, &quot;</span>
+ <span class="s">&quot;not both. [NOSE_DOCTEST_TESTS]&quot;</span><span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--doctest-extension&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;append&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s">&quot;doctestExtension&quot;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s">&quot;Also look for doctests in files with &quot;</span>
@@ -175,7 +189,8 @@ course of running a test.</p>
<span class="n">dh</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="n">parser</span> <span class="o">=</span> <span class="n">doctest</span><span class="o">.</span><span class="n">DocTestParser</span><span class="p">()</span>
<span class="n">test</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">get_doctest</span><span class="p">(</span>
- <span class="n">doc</span><span class="p">,</span> <span class="n">globs</span><span class="o">=</span><span class="p">{},</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
+ <span class="n">doc</span><span class="p">,</span> <span class="n">globs</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;__file__&#39;</span><span class="p">:</span> <span class="n">filename</span><span class="p">},</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span>
+ <span class="n">filename</span><span class="o">=</span><span class="n">filename</span><span class="p">,</span> <span class="n">lineno</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="k">if</span> <span class="n">test</span><span class="o">.</span><span class="n">examples</span><span class="p">:</span>
<span class="k">yield</span> <span class="n">DocFileCase</span><span class="p">(</span><span class="n">test</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
@@ -271,6 +286,17 @@ course of running a test.</p>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">address</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_dt_test</span><span class="o">.</span><span class="n">filename</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
+
+
+<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="o">*</span><span class="n">arg</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
+ <span class="sd">&quot;&quot;&quot;DEPRECATED: moved to nose.plugins.plugintest.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="k">import</span> <span class="nn">warnings</span>
+ <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="s">&quot;run() has been moved to nose.plugins.plugintest. Please &quot;</span>
+ <span class="s">&quot;update your imports.&quot;</span><span class="p">,</span> <span class="n">category</span><span class="o">=</span><span class="ne">DeprecationWarning</span><span class="p">,</span>
+ <span class="n">stacklevel</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
+ <span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+ <span class="n">run</span><span class="p">(</span><span class="o">*</span><span class="n">arg</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
</pre></div>
diff --git a/doc/plugin_exceptions.html b/doc/plugin_exceptions.html
new file mode 100644
index 0000000..7ff2f3f
--- /dev/null
+++ b/doc/plugin_exceptions.html
@@ -0,0 +1,124 @@
+<html>
+ <head>
+ <title>nose: When Plugins Fail</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: When Plugins Fail</h1>
+
+ <p>Plugin methods should not fail silently. When a plugin method raises
+an exception before or during the execution of a test, the exception
+will be wrapped in a <a class="reference" href="module_nose.case.html#Failure">nose.case.Failure</a> instance and appear as a
+failing test. Exceptions raised at other times, such as in the
+preparation phase with <tt class="docutils literal"><span class="pre">prepareTestLoader</span></tt> or <tt class="docutils literal"><span class="pre">prepareTestResult</span></tt>,
+or after a test executes, in <tt class="docutils literal"><span class="pre">afterTest</span></tt> will stop the entire test
+run.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">sys</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+</pre></div>
+</blockquote>
+<p>Our first test plugins take no command-line arguments and raises
+AttributeError in beforeTest and afterTest.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">EnabledPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="sd">&quot;&quot;&quot;Plugin that takes no command-line arguments&quot;&quot;&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="p">{}):</span>
+<span class="gp">... </span> <span class="k">pass</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">FailBeforePlugin</span><span class="p">(</span><span class="n">EnabledPlugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;fail-before&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">beforeTest</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">test</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">()</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">FailAfterPlugin</span><span class="p">(</span><span class="n">EnabledPlugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;fail-after&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">afterTest</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">test</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">()</span>
+</pre></div>
+</blockquote>
+<p>Running tests with the fail-before plugin enabled will result in all
+tests failing.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">support</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;support&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">suitepath</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">support</span><span class="p">,</span> <span class="s">&#39;test_spam.py&#39;</span><span class="p">)</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;nosetests&#39;</span><span class="p">,</span> <span class="n">suitepath</span><span class="p">],</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">FailBeforePlugin</span><span class="p">()])</span>
+<span class="go">EE</span>
+<span class="go">======================================================================</span>
+<span class="go">ERROR: test_spam.test_spam</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">AttributeError</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">======================================================================</span>
+<span class="go">ERROR: test_spam.test_eggs</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">AttributeError</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 0 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">FAILED (errors=2)</span>
+</pre></div>
+</blockquote>
+<p>But with the fail-after plugin, the entire test run will fail.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;nosetests&#39;</span><span class="p">,</span> <span class="n">suitepath</span><span class="p">],</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">FailAfterPlugin</span><span class="p">()])</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">AttributeError</span>
+</pre></div>
+</blockquote>
+<p>Likewise since the next plugin fails in a preparatory method, outside
+of test execution, the entire test run fails when the plugin is used.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">FailPreparationPlugin</span><span class="p">(</span><span class="n">EnabledPlugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;fail-prepare&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">prepareTestLoader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">loader</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s">&quot;That loader is not my type&quot;</span><span class="p">)</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;nosetests&#39;</span><span class="p">,</span> <span class="n">suitepath</span><span class="p">],</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">FailPreparationPlugin</span><span class="p">()])</span>
+<span class="gt">Traceback (most recent call last):</span>
+<span class="c">...</span>
+<span class="nc">TypeError</span>: <span class="n-Identifier">That loader is not my type</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/plugin_failuredetail.html b/doc/plugin_failuredetail.html
index 49d9efd..35725d2 100644
--- a/doc/plugin_failuredetail.html
+++ b/doc/plugin_failuredetail.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_interface.html b/doc/plugin_interface.html
index 76e94db..9259838 100644
--- a/doc/plugin_interface.html
+++ b/doc/plugin_interface.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
<h2>New methods</h2><ul><li><a href="#afterContext">afterContext</a></li><li><a href="#afterDirectory">afterDirectory</a></li><li><a href="#afterImport">afterImport</a></li><li><a href="#afterTest">afterTest</a></li><li><a href="#beforeContext">beforeContext</a></li><li><a href="#beforeDirectory">beforeDirectory</a></li><li><a href="#beforeImport">beforeImport</a></li><li><a href="#beforeTest">beforeTest</a></li><li><a href="#describeTest">describeTest</a></li><li><a href="#formatError">formatError</a></li><li><a href="#formatFailure">formatFailure</a></li><li><a href="#handleError">handleError</a></li><li><a href="#handleFailure">handleFailure</a></li><li><a href="#loadTestsFromDir">loadTestsFromDir</a></li><li><a href="#loadTestsFromFile">loadTestsFromFile</a></li><li><a href="#loadTestsFromNames">loadTestsFromNames</a></li><li><a href="#loadTestsFromTestClass">loadTestsFromTestClass</a></li><li><a href="#makeTest">makeTest</a></li><li><a href="#options">options</a></li><li><a href="#prepareTestCase">prepareTestCase</a></li><li><a href="#prepareTestLoader">prepareTestLoader</a></li><li><a href="#prepareTestResult">prepareTestResult</a></li><li><a href="#prepareTestRunner">prepareTestRunner</a></li><li><a href="#startContext">startContext</a></li><li><a href="#stopContext">stopContext</a></li><li><a href="#testName">testName</a></li></ul><h2>Changed methods</h2><ul><li><a href="#addError">addError</a></li><li><a href="#addFailure">addFailure</a></li><li><a href="#addSuccess">addSuccess</a></li></ul><h2>Deprecated methods</h2><ul><li><a href="#addDeprecated">addDeprecated</a></li><li><a href="#addOptions">addOptions</a></li><li><a href="#addSkip">addSkip</a></li><li><a href="#add_options">add_options</a></li><li><a href="#loadTestsFromPath">loadTestsFromPath</a></li><li><a href="#wantModuleTests">wantModuleTests</a></li></ul>
</div>
@@ -67,7 +67,7 @@ specified attributes.</li>
<p>To alter error handling behavior -- for instance to catch a
certain class of exception and handle it differently from the
normal error or failure handling -- you should subclass
-<cite>ErrorClassPlugin</cite>. See the documentation for <a class="reference" href="errorclassplugin.html">ErrorClassPlugin</a> for
+<cite>ErrorClassPlugin</cite>. See the documentation for <a class="reference" href="error_class_plugin.html">ErrorClassPlugin</a> for
more details.</p>
<p>Examples:</p>
<ul class="simple">
@@ -131,10 +131,10 @@ runs the test through the hotshot profiler's runcall() method.</li>
<img src="chain.png" alt="chainable" />.</p>
-<div class="method deprecated">
-<a name="addDeprecated">
-<span class="name">addDeprecated</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called when a deprecated test is seen. DO NOT return a value
+ <div class="method deprecated">
+ <a name="addDeprecated">
+ <span class="name">addDeprecated</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called when a deprecated test is seen. DO NOT return a value
unless you want to stop other plugins from seeing the deprecated
test.</p>
<div class="note">
@@ -155,12 +155,12 @@ test.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method changed">
-<a name="addError">
-<span class="name">addError</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called when a test raises an uncaught exception. DO NOT return a
+ </div>
+
+ <div class="method changed">
+ <a name="addError">
+ <span class="name">addError</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called when a test raises an uncaught exception. DO NOT return a
value unless you want to stop other plugins from seeing that the
test has raised an error.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -187,12 +187,12 @@ test has raised an error.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method changed">
-<a name="addFailure">
-<span class="name">addFailure</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called when a test fails. DO NOT return a value unless you
+ </div>
+
+ <div class="method changed">
+ <a name="addFailure">
+ <span class="name">addFailure</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called when a test fails. DO NOT return a value unless you
want to stop other plugins from seeing that the test has failed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -225,12 +225,12 @@ want to stop other plugins from seeing that the test has failed.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method deprecated">
-<a name="addOptions">
-<span class="name">addOptions</span><span class="arg">(self, parser, env=os.environ)</span></a>
-<div class="doc"><p>Called to allow plugin to register command line
+ </div>
+
+ <div class="method deprecated">
+ <a name="addOptions">
+ <span class="name">addOptions</span><span class="arg">(self, parser, env=os.environ)</span></a>
+ <div class="doc"><p>Called to allow plugin to register command line
options with the parser.</p>
<p>Do <em>not</em> return a value from this method unless you want to stop
all other plugins from setting their options.</p>
@@ -239,12 +239,12 @@ all other plugins from setting their options.</p>
<p class="last">DEPRECATED -- implement <cite>options</cite> instead.</p>
</div>
</div>
-</div>
-
-<div class="method deprecated">
-<a name="addSkip">
-<span class="name">addSkip</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called when a test is skipped. DO NOT return a value unless
+ </div>
+
+ <div class="method deprecated">
+ <a name="addSkip">
+ <span class="name">addSkip</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called when a test is skipped. DO NOT return a value unless
you want to stop other plugins from seeing the skipped test.</p>
<div class="note">
<p class="first admonition-title">Note</p>
@@ -264,12 +264,12 @@ you want to stop other plugins from seeing the skipped test.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method changed">
-<a name="addSuccess">
-<span class="name">addSuccess</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called when a test passes. DO NOT return a value unless you
+ </div>
+
+ <div class="method changed">
+ <a name="addSuccess">
+ <span class="name">addSuccess</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called when a test passes. DO NOT return a value unless you
want to stop other plugins from seeing the passing test.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -292,12 +292,12 @@ want to stop other plugins from seeing the passing test.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method deprecated">
-<a name="add_options">
-<span class="name">add_options</span><span class="arg">(self, parser, env=os.environ)</span></a>
-<div class="doc"><p>Called to allow plugin to register command line
+ </div>
+
+ <div class="method deprecated">
+ <a name="add_options">
+ <span class="name">add_options</span><span class="arg">(self, parser, env=os.environ)</span></a>
+ <div class="doc"><p>Called to allow plugin to register command line
options with the parser.</p>
<p>Do <em>not</em> return a value from this method unless you want to stop
all other plugins from setting their options.</p>
@@ -306,21 +306,21 @@ all other plugins from setting their options.</p>
<p class="last">DEPRECATED -- implement <cite>options</cite> instead.</p>
</div>
</div>
-</div>
-
-<div class="method new">
-<a name="afterContext">
-<span class="name">afterContext</span><span class="arg">(self)</span></a>
-<div class="doc"><p>Called after a context (generally a module) has been
+ </div>
+
+ <div class="method new">
+ <a name="afterContext">
+ <span class="name">afterContext</span><span class="arg">(self)</span></a>
+ <div class="doc"><p>Called after a context (generally a module) has been
lazy-loaded, imported, setup, had its tests loaded and
executed, and torn down.</p>
</div>
-</div>
-
-<div class="method new">
-<a name="afterDirectory">
-<span class="name">afterDirectory</span><span class="arg">(self, path)</span></a>
-<div class="doc"><p>Called after all tests have been loaded from directory at path
+ </div>
+
+ <div class="method new">
+ <a name="afterDirectory">
+ <span class="name">afterDirectory</span><span class="arg">(self, path)</span></a>
+ <div class="doc"><p>Called after all tests have been loaded from directory at path
and run.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -336,12 +336,12 @@ and run.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="afterImport">
-<span class="name">afterImport</span><span class="arg">(self, filename, module)</span></a>
-<div class="doc"><p>Called after module is imported from filename. afterImport
+ </div>
+
+ <div class="method new">
+ <a name="afterImport">
+ <span class="name">afterImport</span><span class="arg">(self, filename, module)</span></a>
+ <div class="doc"><p>Called after module is imported from filename. afterImport
is called even if the import failed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -360,12 +360,12 @@ is called even if the import failed.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="afterTest">
-<span class="name">afterTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called after the test has been run and the result recorded
+ </div>
+
+ <div class="method new">
+ <a name="afterTest">
+ <span class="name">afterTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called after the test has been run and the result recorded
(after stopTest).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -381,12 +381,12 @@ is called even if the import failed.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="beforeContext">
-<span class="name">beforeContext</span><span class="arg">(self)</span></a>
-<div class="doc"><p>Called before a context (generally a module) is
+ </div>
+
+ <div class="method new">
+ <a name="beforeContext">
+ <span class="name">beforeContext</span><span class="arg">(self)</span></a>
+ <div class="doc"><p>Called before a context (generally a module) is
examined. Since the context is not yet loaded, plugins don't
get to know what the context is; so any context operations
should use a stack that is pushed in <cite>beforeContext</cite> and popped
@@ -399,12 +399,12 @@ and <cite>stopContext</cite>, which are passed the context in question, but
are called after it has been loaded (imported in the module
case).</p>
</div>
-</div>
-
-<div class="method new">
-<a name="beforeDirectory">
-<span class="name">beforeDirectory</span><span class="arg">(self, path)</span></a>
-<div class="doc"><p>Called before tests are loaded from directory at path.</p>
+ </div>
+
+ <div class="method new">
+ <a name="beforeDirectory">
+ <span class="name">beforeDirectory</span><span class="arg">(self, path)</span></a>
+ <div class="doc"><p>Called before tests are loaded from directory at path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -419,12 +419,12 @@ case).</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="beforeImport">
-<span class="name">beforeImport</span><span class="arg">(self, filename, module)</span></a>
-<div class="doc"><p>Called before module is imported from filename.</p>
+ </div>
+
+ <div class="method new">
+ <a name="beforeImport">
+ <span class="name">beforeImport</span><span class="arg">(self, filename, module)</span></a>
+ <div class="doc"><p>Called before module is imported from filename.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -442,12 +442,12 @@ case).</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="beforeTest">
-<span class="name">beforeTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called before the test is run (before startTest).</p>
+ </div>
+
+ <div class="method new">
+ <a name="beforeTest">
+ <span class="name">beforeTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called before the test is run (before startTest).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -462,32 +462,32 @@ case).</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="begin">
-<span class="name">begin</span><span class="arg">(self)</span></a>
-<div class="doc"><p>Called before any tests are collected or run. Use this to
+ </div>
+
+ <div class="method ">
+ <a name="begin">
+ <span class="name">begin</span><span class="arg">(self)</span></a>
+ <div class="doc"><p>Called before any tests are collected or run. Use this to
perform any setup needed before testing begins.</p>
</div>
-</div>
-
-<div class="method ">
-<a name="configure">
-<span class="name">configure</span><span class="arg">(self, options, conf)</span></a>
-<div class="doc"><p>Called after the command line has been parsed, with the
+ </div>
+
+ <div class="method ">
+ <a name="configure">
+ <span class="name">configure</span><span class="arg">(self, options, conf)</span></a>
+ <div class="doc"><p>Called after the command line has been parsed, with the
parsed options and the config container. Here, implement any
config storage or changes to state or operation that are set
by command line options.</p>
<p>Do <em>not</em> return a value from this method unless you want to
stop all other plugins from being configured.</p>
</div>
-</div>
-
-<div class="method new">
-<a name="describeTest">
-<span class="name">describeTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Return a test description. Called by
+ </div>
+
+ <div class="method new">
+ <a name="describeTest">
+ <span class="name">describeTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Return a test description. Called by
<cite>nose.case.Test.shortDescription</cite>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -503,12 +503,12 @@ stop all other plugins from being configured.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="finalize">
-<span class="name">finalize</span><span class="arg">(self, result)</span></a>
-<div class="doc"><p>Called after all report output, including output from all
+ </div>
+
+ <div class="method ">
+ <a name="finalize">
+ <span class="name">finalize</span><span class="arg">(self, result)</span></a>
+ <div class="doc"><p>Called after all report output, including output from all
plugins, has been sent to the stream. Use this to print final
test results or perform final cleanup. Return None to allow
other plugins to continue printing, any other value to stop
@@ -521,12 +521,12 @@ via <tt class="docutils literal"><span class="pre">python</span> <span class="pr
<strong>before</strong> the default report output is sent.</p>
</div>
</div>
-</div>
-
-<div class="method new chainable">
-<a name="formatError">
-<span class="name">formatError</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called in result.addError, before plugin.addError. If you
+ </div>
+
+ <div class="method new chainable">
+ <a name="formatError">
+ <span class="name">formatError</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called in result.addError, before plugin.addError. If you
want to replace or modify the error tuple, return a new error
tuple.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -546,12 +546,12 @@ tuple.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new chainable">
-<a name="formatFailure">
-<span class="name">formatFailure</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called in result.addFailure, before plugin.addFailure. If you
+ </div>
+
+ <div class="method new chainable">
+ <a name="formatFailure">
+ <span class="name">formatFailure</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called in result.addFailure, before plugin.addFailure. If you
want to replace or modify the error tuple, return a new error
tuple. Since this method is chainable, you must return the
test as well, so you you'll return something like:</p>
@@ -575,12 +575,12 @@ return (test, err)
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="handleError">
-<span class="name">handleError</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called on addError. To handle the error yourself and prevent normal
+ </div>
+
+ <div class="method new">
+ <a name="handleError">
+ <span class="name">handleError</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called on addError. To handle the error yourself and prevent normal
error processing, return a true value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -599,12 +599,12 @@ error processing, return a true value.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="handleFailure">
-<span class="name">handleFailure</span><span class="arg">(self, test, err)</span></a>
-<div class="doc"><p>Called on addFailure. To handle the failure yourself and
+ </div>
+
+ <div class="method new">
+ <a name="handleFailure">
+ <span class="name">handleFailure</span><span class="arg">(self, test, err)</span></a>
+ <div class="doc"><p>Called on addFailure. To handle the failure yourself and
prevent normal failure processing, return a true value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -623,12 +623,12 @@ prevent normal failure processing, return a true value.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new generative">
-<a name="loadTestsFromDir">
-<span class="name">loadTestsFromDir</span><span class="arg">(self, path)</span></a>
-<div class="doc"><p>Return iterable of tests from a directory. May be a
+ </div>
+
+ <div class="method new generative">
+ <a name="loadTestsFromDir">
+ <span class="name">loadTestsFromDir</span><span class="arg">(self, path)</span></a>
+ <div class="doc"><p>Return iterable of tests from a directory. May be a
generator. Each item returned must be a runnable
unittest.TestCase (or subclass) instance or suite instance.
Return None if your plugin cannot collect any tests from
@@ -647,12 +647,12 @@ directory.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new generative">
-<a name="loadTestsFromFile">
-<span class="name">loadTestsFromFile</span><span class="arg">(self, filename)</span></a>
-<div class="doc"><p>Return tests in this file. Return None if you are not
+ </div>
+
+ <div class="method new generative">
+ <a name="loadTestsFromFile">
+ <span class="name">loadTestsFromFile</span><span class="arg">(self, filename)</span></a>
+ <div class="doc"><p>Return tests in this file. Return None if you are not
interested in loading any tests, or an iterable if you are and
can load some. May be a generator. <em>If you are interested in
loading tests from the file and encounter no errors, but find
@@ -676,12 +676,12 @@ API.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method generative">
-<a name="loadTestsFromModule">
-<span class="name">loadTestsFromModule</span><span class="arg">(self, module)</span></a>
-<div class="doc"><p>Return iterable of tests in a module. May be a
+ </div>
+
+ <div class="method generative">
+ <a name="loadTestsFromModule">
+ <span class="name">loadTestsFromModule</span><span class="arg">(self, module)</span></a>
+ <div class="doc"><p>Return iterable of tests in a module. May be a
generator. Each item returned must be a runnable
unittest.TestCase (or subclass) instance.
Return None if your plugin cannot
@@ -700,12 +700,12 @@ collect any tests from module.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method generative">
-<a name="loadTestsFromName">
-<span class="name">loadTestsFromName</span><span class="arg">(self, name, module=None, importPath=None)</span></a>
-<div class="doc"><p>Return tests in this file or module. Return None if you are not able
+ </div>
+
+ <div class="method generative">
+ <a name="loadTestsFromName">
+ <span class="name">loadTestsFromName</span><span class="arg">(self, name, module=None, importPath=None)</span></a>
+ <div class="doc"><p>Return tests in this file or module. Return None if you are not able
to load any tests, or an iterable if you are. May be a
generator.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -735,12 +735,12 @@ whatever you want.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new chainable">
-<a name="loadTestsFromNames">
-<span class="name">loadTestsFromNames</span><span class="arg">(self, names, module=None)</span></a>
-<div class="doc"><p>Return a tuple of (tests loaded, remaining names). Return
+ </div>
+
+ <div class="method new chainable">
+ <a name="loadTestsFromNames">
+ <span class="name">loadTestsFromNames</span><span class="arg">(self, names, module=None)</span></a>
+ <div class="doc"><p>Return a tuple of (tests loaded, remaining names). Return
None if you are not able to load any tests. Multiple plugins
may implement loadTestsFromNames; the remaining name list from
each will be passed to the next as input.</p>
@@ -761,22 +761,22 @@ each will be passed to the next as input.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method deprecated">
-<a name="loadTestsFromPath">
-<span class="name">loadTestsFromPath</span><span class="arg">(self, path)</span></a>
-<div class="doc"><div class="note">
+ </div>
+
+ <div class="method deprecated">
+ <a name="loadTestsFromPath">
+ <span class="name">loadTestsFromPath</span><span class="arg">(self, path)</span></a>
+ <div class="doc"><div class="note">
<p class="first admonition-title">Note</p>
<p class="last">DEPRECATED -- use loadTestsFromFile instead</p>
</div>
</div>
-</div>
-
-<div class="method generative">
-<a name="loadTestsFromTestCase">
-<span class="name">loadTestsFromTestCase</span><span class="arg">(self, cls)</span></a>
-<div class="doc"><p>Return tests in this test case class. Return None if you are
+ </div>
+
+ <div class="method generative">
+ <a name="loadTestsFromTestCase">
+ <span class="name">loadTestsFromTestCase</span><span class="arg">(self, cls)</span></a>
+ <div class="doc"><p>Return tests in this test case class. Return None if you are
not able to load any tests, or an iterable if you are. May be a
generator.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -793,12 +793,12 @@ generator.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new generative">
-<a name="loadTestsFromTestClass">
-<span class="name">loadTestsFromTestClass</span><span class="arg">(self, cls)</span></a>
-<div class="doc"><p>Return tests in this test class. Class will <em>not</em> be a
+ </div>
+
+ <div class="method new generative">
+ <a name="loadTestsFromTestClass">
+ <span class="name">loadTestsFromTestClass</span><span class="arg">(self, cls)</span></a>
+ <div class="doc"><p>Return tests in this test class. Class will <em>not</em> be a
unittest.TestCase subclass. Return None if you are not able to
load any tests, an iterable if you are. May be a generator.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -815,12 +815,12 @@ load any tests, an iterable if you are. May be a generator.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new generative">
-<a name="makeTest">
-<span class="name">makeTest</span><span class="arg">(self, obj, parent)</span></a>
-<div class="doc"><p>Given an object and its parent, return or yield one or more
+ </div>
+
+ <div class="method new generative">
+ <a name="makeTest">
+ <span class="name">makeTest</span><span class="arg">(self, obj, parent)</span></a>
+ <div class="doc"><p>Given an object and its parent, return or yield one or more
test cases. Each test must be a unittest.TestCase (or subclass)
instance. This is called before default test loading to allow
plugins to load an alternate test case or cases for an
@@ -842,22 +842,22 @@ object. May be a generator.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="options">
-<span class="name">options</span><span class="arg">(self, parser, env=os.environ)</span></a>
-<div class="doc"><p>Called to allow plugin to register command line
+ </div>
+
+ <div class="method new">
+ <a name="options">
+ <span class="name">options</span><span class="arg">(self, parser, env=os.environ)</span></a>
+ <div class="doc"><p>Called to allow plugin to register command line
options with the parser.</p>
<p>Do <em>not</em> return a value from this method unless you want to stop
all other plugins from setting their options.</p>
</div>
-</div>
-
-<div class="method ">
-<a name="prepareTest">
-<span class="name">prepareTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called before the test is run by the test runner. Please
+ </div>
+
+ <div class="method ">
+ <a name="prepareTest">
+ <span class="name">prepareTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called before the test is run by the test runner. Please
note the article <em>the</em> in the previous sentence: prepareTest
is called <em>only once</em>, and is passed the test case or test
suite that the test runner will execute. It is <em>not</em> called
@@ -880,12 +880,12 @@ instead.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="prepareTestCase">
-<span class="name">prepareTestCase</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Prepare or wrap an individual test case. Called before
+ </div>
+
+ <div class="method new">
+ <a name="prepareTestCase">
+ <span class="name">prepareTestCase</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Prepare or wrap an individual test case. Called before
execution of the test. The test passed here is a
nose.case.Test instance; the case to be executed is in the
test attribute of the passed case. To modify the test to be
@@ -909,12 +909,12 @@ exception handling and result calls, etc.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="prepareTestLoader">
-<span class="name">prepareTestLoader</span><span class="arg">(self, loader)</span></a>
-<div class="doc"><p>Called before tests are loaded. To replace the test loader,
+ </div>
+
+ <div class="method new">
+ <a name="prepareTestLoader">
+ <span class="name">prepareTestLoader</span><span class="arg">(self, loader)</span></a>
+ <div class="doc"><p>Called before tests are loaded. To replace the test loader,
return a test loader. To allow other plugins to process the
test loader, return None. Only one plugin may replace the test
loader. Only valid when using nose.TestProgram.</p>
@@ -932,12 +932,12 @@ loader. Only valid when using nose.TestProgram.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="prepareTestResult">
-<span class="name">prepareTestResult</span><span class="arg">(self, result)</span></a>
-<div class="doc"><p>Called before the first test is run. To use a different
+ </div>
+
+ <div class="method new">
+ <a name="prepareTestResult">
+ <span class="name">prepareTestResult</span><span class="arg">(self, result)</span></a>
+ <div class="doc"><p>Called before the first test is run. To use a different
test result handler for all tests than the given result,
return a test result handler. NOTE however that this handler
will only be seen by tests, that is, inside of the result
@@ -963,14 +963,14 @@ and return the patched result.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="prepareTestRunner">
-<span class="name">prepareTestRunner</span><span class="arg">(self, runner)</span></a>
-<div class="doc"><p>Called before tests are run. To replace the test runner,
+ </div>
+
+ <div class="method new">
+ <a name="prepareTestRunner">
+ <span class="name">prepareTestRunner</span><span class="arg">(self, runner)</span></a>
+ <div class="doc"><p>Called before tests are run. To replace the test runner,
return a test runner. To allow other plugins to process the
-test runner, return None. Only valid when using nose.TesrProgram.</p>
+test runner, return None. Only valid when using nose.TestProgram.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -985,12 +985,12 @@ test runner, return None. Only valid when using nose.TesrProgram.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="report">
-<span class="name">report</span><span class="arg">(self, stream)</span></a>
-<div class="doc"><p>Called after all error output has been printed. Print your
+ </div>
+
+ <div class="method ">
+ <a name="report">
+ <span class="name">report</span><span class="arg">(self, stream)</span></a>
+ <div class="doc"><p>Called after all error output has been printed. Print your
plugin's report to the provided stream. Return None to allow
other plugins to print reports, any other value to stop them.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -1007,12 +1007,12 @@ other plugins to print reports, any other value to stop them.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="setOutputStream">
-<span class="name">setOutputStream</span><span class="arg">(self, stream)</span></a>
-<div class="doc"><p>Called before test output begins. To direct test output to a
+ </div>
+
+ <div class="method ">
+ <a name="setOutputStream">
+ <span class="name">setOutputStream</span><span class="arg">(self, stream)</span></a>
+ <div class="doc"><p>Called before test output begins. To direct test output to a
new stream, return a stream object, which must implement a
<cite>write(msg)</cite> method. If you only want to note the stream, not
capture or redirect it, then return None.</p>
@@ -1030,12 +1030,12 @@ capture or redirect it, then return None.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="startContext">
-<span class="name">startContext</span><span class="arg">(self, context)</span></a>
-<div class="doc"><p>Called before context setup and the running of tests in the
+ </div>
+
+ <div class="method new">
+ <a name="startContext">
+ <span class="name">startContext</span><span class="arg">(self, context)</span></a>
+ <div class="doc"><p>Called before context setup and the running of tests in the
context. Note that tests have already been <em>loaded</em> from the
context before this call.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -1053,12 +1053,12 @@ other object that contains tests.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="startTest">
-<span class="name">startTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called before each test is run. DO NOT return a value unless
+ </div>
+
+ <div class="method ">
+ <a name="startTest">
+ <span class="name">startTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called before each test is run. DO NOT return a value unless
you want to stop other plugins from seeing the test start.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1074,12 +1074,12 @@ you want to stop other plugins from seeing the test start.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="stopContext">
-<span class="name">stopContext</span><span class="arg">(self, context)</span></a>
-<div class="doc"><p>Called after the tests in a context have run and the
+ </div>
+
+ <div class="method new">
+ <a name="stopContext">
+ <span class="name">stopContext</span><span class="arg">(self, context)</span></a>
+ <div class="doc"><p>Called after the tests in a context have run and the
context has been torn down.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1095,12 +1095,12 @@ context has been torn down.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="stopTest">
-<span class="name">stopTest</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Called after each test is run. DO NOT return a value unless
+ </div>
+
+ <div class="method ">
+ <a name="stopTest">
+ <span class="name">stopTest</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Called after each test is run. DO NOT return a value unless
you want to stop other plugins from seeing that the test has stopped.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1116,12 +1116,12 @@ you want to stop other plugins from seeing that the test has stopped.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method new">
-<a name="testName">
-<span class="name">testName</span><span class="arg">(self, test)</span></a>
-<div class="doc"><p>Return a short test name. Called by <cite>nose.case.Test.__str__</cite>.</p>
+ </div>
+
+ <div class="method new">
+ <a name="testName">
+ <span class="name">testName</span><span class="arg">(self, test)</span></a>
+ <div class="doc"><p>Return a short test name. Called by <cite>nose.case.Test.__str__</cite>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -1136,12 +1136,12 @@ you want to stop other plugins from seeing that the test has stopped.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantClass">
-<span class="name">wantClass</span><span class="arg">(self, cls)</span></a>
-<div class="doc"><p>Return true if you want the main test selector to collect
+ </div>
+
+ <div class="method ">
+ <a name="wantClass">
+ <span class="name">wantClass</span><span class="arg">(self, cls)</span></a>
+ <div class="doc"><p>Return true if you want the main test selector to collect
tests from this class, false if you don't, and None if you don't
care.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -1158,12 +1158,12 @@ care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantDirectory">
-<span class="name">wantDirectory</span><span class="arg">(self, dirname)</span></a>
-<div class="doc"><p>Return true if you want test collection to descend into this
+ </div>
+
+ <div class="method ">
+ <a name="wantDirectory">
+ <span class="name">wantDirectory</span><span class="arg">(self, dirname)</span></a>
+ <div class="doc"><p>Return true if you want test collection to descend into this
directory, false if you do not, and None if you don't care.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1179,12 +1179,12 @@ directory, false if you do not, and None if you don't care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantFile">
-<span class="name">wantFile</span><span class="arg">(self, file)</span></a>
-<div class="doc"><p>Return true if you want to collect tests from this file,
+ </div>
+
+ <div class="method ">
+ <a name="wantFile">
+ <span class="name">wantFile</span><span class="arg">(self, file)</span></a>
+ <div class="doc"><p>Return true if you want to collect tests from this file,
false if you do not and None if you don't care.</p>
<p>Change from 0.9: The optional package parameter is no longer passed.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -1201,12 +1201,12 @@ false if you do not and None if you don't care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantFunction">
-<span class="name">wantFunction</span><span class="arg">(self, function)</span></a>
-<div class="doc"><p>Return true to collect this function as a test, false to
+ </div>
+
+ <div class="method ">
+ <a name="wantFunction">
+ <span class="name">wantFunction</span><span class="arg">(self, function)</span></a>
+ <div class="doc"><p>Return true to collect this function as a test, false to
prevent it from being collected, and None if you don't care.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1222,12 +1222,12 @@ prevent it from being collected, and None if you don't care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantMethod">
-<span class="name">wantMethod</span><span class="arg">(self, method)</span></a>
-<div class="doc"><p>Return true to collect this method as a test, false to
+ </div>
+
+ <div class="method ">
+ <a name="wantMethod">
+ <span class="name">wantMethod</span><span class="arg">(self, method)</span></a>
+ <div class="doc"><p>Return true to collect this method as a test, false to
prevent it from being collected, and None if you don't care.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@@ -1243,12 +1243,12 @@ prevent it from being collected, and None if you don't care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method ">
-<a name="wantModule">
-<span class="name">wantModule</span><span class="arg">(self, module)</span></a>
-<div class="doc"><p>Return true if you want to collection to descend into this
+ </div>
+
+ <div class="method ">
+ <a name="wantModule">
+ <span class="name">wantModule</span><span class="arg">(self, module)</span></a>
+ <div class="doc"><p>Return true if you want to collection to descend into this
module, false to prevent the collector from descending into the
module, and None if you don't care.</p>
<table class="docutils field-list" frame="void" rules="none">
@@ -1257,7 +1257,7 @@ module, and None if you don't care.</p>
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt>module <span class="classifier-delimiter">:</span> <span class="classifier">python module</span></dt>
-<dd><p class="first last">The module object being examined by the selecto</p>
+<dd><p class="first last">The module object being examined by the selector</p>
</dd>
</dl>
</td>
@@ -1265,19 +1265,19 @@ module, and None if you don't care.</p>
</tbody>
</table>
</div>
-</div>
-
-<div class="method deprecated">
-<a name="wantModuleTests">
-<span class="name">wantModuleTests</span><span class="arg">(self, module)</span></a>
-<div class="doc"><div class="note">
+ </div>
+
+ <div class="method deprecated">
+ <a name="wantModuleTests">
+ <span class="name">wantModuleTests</span><span class="arg">(self, module)</span></a>
+ <div class="doc"><div class="note">
<p class="first admonition-title">Note</p>
<p class="last">DEPRECATED -- this method will not be called, it has
-been folded in to wantModule.</p>
-</div>
+been folded into wantModule.</p>
</div>
</div>
-
+ </div>
+
</div>
diff --git a/doc/plugin_isolate.html b/doc/plugin_isolate.html
index 0cf5f9f..277cd16 100644
--- a/doc/plugin_isolate.html
+++ b/doc/plugin_isolate.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_prof.html b/doc/plugin_prof.html
index 15ed4aa..4df35f6 100644
--- a/doc/plugin_prof.html
+++ b/doc/plugin_prof.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
@@ -75,15 +75,15 @@ more details on the various output options.</p>
<span class="n">clean_stats_file</span> <span class="o">=</span> <span class="bp">False</span>
<span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">):</span>
<span class="n">Plugin</span><span class="o">.</span><span class="n">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="p">)</span>
- <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-sort&#39;</span><span class="p">,</span><span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span><span class="n">dest</span><span class="o">=</span><span class="s">&#39;profile_sort&#39;</span><span class="p">,</span>
- <span class="n">default</span><span class="o">=</span><span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;NOSE_PROFILE_SORT&#39;</span><span class="p">,</span><span class="s">&#39;cumulative&#39;</span><span class="p">),</span>
+ <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-sort&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;profile_sort&#39;</span><span class="p">,</span>
+ <span class="n">default</span><span class="o">=</span><span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;NOSE_PROFILE_SORT&#39;</span><span class="p">,</span> <span class="s">&#39;cumulative&#39;</span><span class="p">),</span>
<span class="n">help</span><span class="o">=</span><span class="s">&quot;Set sort order for profiler output&quot;</span><span class="p">)</span>
- <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-stats-file&#39;</span><span class="p">,</span><span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
+ <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-stats-file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s">&#39;profile_stats_file&#39;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;NOSE_PROFILE_STATS_FILE&#39;</span><span class="p">),</span>
<span class="n">help</span><span class="o">=</span><span class="s">&#39;Profiler stats file; default is a new &#39;</span>
<span class="s">&#39;temp file on each run&#39;</span><span class="p">)</span>
- <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-restrict&#39;</span><span class="p">,</span><span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span>
+ <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--profile-restrict&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;append&#39;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s">&#39;profile_restrict&#39;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;NOSE_PROFILE_RESTRICT&#39;</span><span class="p">),</span>
<span class="n">help</span><span class="o">=</span><span class="s">&quot;Restrict profiler output. See help for &quot;</span>
@@ -132,6 +132,10 @@ more details on the various output options.</p>
<span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="n">tmp</span>
<span class="k">def</span> <span class="nf">finalize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">result</span><span class="p">):</span>
+ <span class="k">try</span><span class="p">:</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">prof</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+ <span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
+ <span class="k">pass</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">clean_stats_file</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fileno</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
diff --git a/doc/plugin_skip.html b/doc/plugin_skip.html
index 3c7d625..9314a2f 100644
--- a/doc/plugin_skip.html
+++ b/doc/plugin_skip.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
diff --git a/doc/plugin_testid.html b/doc/plugin_testid.html
index 0728c9a..e1ed040 100644
--- a/doc/plugin_testid.html
+++ b/doc/plugin_testid.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
<div id="main">
@@ -66,6 +66,7 @@ specifying a test id.</p>
without the # prefix) instead of test names.
[NOSE_WITH_ID]
--id-file=TESTIDFILE Store test ids found in test runs in this file.
+ Default is the file .noseids in the working directory.
</pre>
<h2>Source</h2>
@@ -131,13 +132,16 @@ specifying a test id.</p>
<span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="p">):</span>
<span class="n">Plugin</span><span class="o">.</span><span class="n">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--id-file&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store&#39;</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s">&#39;testIdFile&#39;</span><span class="p">,</span>
- <span class="n">default</span><span class="o">=</span><span class="s">&#39;~/.noseids&#39;</span><span class="p">,</span>
+ <span class="n">default</span><span class="o">=</span><span class="s">&#39;.noseids&#39;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s">&quot;Store test ids found in test runs in this &quot;</span>
- <span class="s">&quot;file.&quot;</span><span class="p">)</span>
+ <span class="s">&quot;file. Default is the file .noseids in the &quot;</span>
+ <span class="s">&quot;working directory.&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
<span class="n">Plugin</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">idfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="n">options</span><span class="o">.</span><span class="n">testIdFile</span><span class="p">)</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isabs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">idfile</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">idfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">workingDir</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">idfile</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="mi">1</span>
<span class="c"># Ids and tests are mirror images: ids are {id: test address} and</span>
<span class="c"># tests are {test address: id}</span>
diff --git a/doc/plugintest_environment.html b/doc/plugintest_environment.html
new file mode 100644
index 0000000..329767c
--- /dev/null
+++ b/doc/plugintest_environment.html
@@ -0,0 +1,144 @@
+<html>
+ <head>
+ <title>nose: nose.plugins.plugintest and os.environ</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: nose.plugins.plugintest and os.environ</h1>
+
+ <p><a class="reference" href="module_nose.plugins.plugintest.html#PluginTester">nose.plugins.plugintest.PluginTester</a> and
+<a class="reference" href="module_nose.plugins.plugintest.html#run">nose.plugins.plugintest.run()</a> are utilities for testing nose
+plugins. When testing plugins, it should be possible to control the
+environment seen plugins under test, and that environment should never
+be affected by <tt class="docutils literal"><span class="pre">os.environ</span></tt>.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.config</span> <span class="k">import</span> <span class="n">Config</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.builtin</span> <span class="k">import</span> <span class="n">FailureDetail</span><span class="p">,</span> <span class="n">Capture</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">PluginTester</span>
+</pre></div>
+</blockquote>
+<p>Our test plugin takes no command-line arguments and simply prints the
+environment it's given by nose.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">PrintEnvPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;print-env&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="c"># no command line arg needed to activate plugin</span>
+<span class="gp">... </span> <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">can_configure</span><span class="p">:</span>
+<span class="gp">... </span> <span class="k">return</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">conf</span> <span class="o">=</span> <span class="n">conf</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="p">{}):</span>
+<span class="gp">... </span> <span class="k">print</span> <span class="n">env</span>
+</pre></div>
+</blockquote>
+<p>The class under test, PluginTester, is designed to be used by
+subclassing.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">Tester</span><span class="p">(</span><span class="n">PluginTester</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">activate</span> <span class="o">=</span> <span class="s">&quot;-v&quot;</span>
+<span class="gp">... </span> <span class="n">plugins</span> <span class="o">=</span> <span class="p">[</span><span class="n">PrintEnvPlugin</span><span class="p">(),</span>
+<span class="gp">... </span> <span class="n">FailureDetail</span><span class="p">(),</span>
+<span class="gp">... </span> <span class="n">Capture</span><span class="p">(),</span>
+<span class="gp">... </span> <span class="p">]</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">makeSuite</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">(</span><span class="n">tests</span><span class="o">=</span><span class="p">[])</span>
+</pre></div>
+</blockquote>
+<p>For the purposes of this test, we need a known <tt class="docutils literal"><span class="pre">os.environ</span></tt>.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">old_environ</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">os</span><span class="o">.</span><span class="n">environ</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;spam&quot;</span><span class="p">:</span> <span class="s">&quot;eggs&quot;</span><span class="p">}</span>
+</pre></div>
+</blockquote>
+<p>If <tt class="docutils literal"><span class="pre">env</span></tt> is not overridden, the default is an empty <tt class="docutils literal"><span class="pre">env</span></tt>.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span> <span class="o">=</span> <span class="n">Tester</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
+<span class="go">{}</span>
+</pre></div>
+</blockquote>
+<p>An empty <tt class="docutils literal"><span class="pre">env</span></tt> is respected...</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">EmptyEnvTester</span><span class="p">(</span><span class="n">Tester</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">env</span> <span class="o">=</span> <span class="p">{}</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span> <span class="o">=</span> <span class="n">EmptyEnvTester</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
+<span class="go">{}</span>
+</pre></div>
+</blockquote>
+<p>... as is a non-empty <tt class="docutils literal"><span class="pre">env</span></tt>.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">NonEmptyEnvTester</span><span class="p">(</span><span class="n">Tester</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">env</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;foo&quot;</span><span class="p">:</span> <span class="s">&quot;bar&quot;</span><span class="p">}</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span> <span class="o">=</span> <span class="n">NonEmptyEnvTester</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">tester</span><span class="o">.</span><span class="n">setUp</span><span class="p">()</span>
+<span class="go">{&#39;foo&#39;: &#39;bar&#39;}</span>
+</pre></div>
+</blockquote>
+<p><tt class="docutils literal"><span class="pre">nose.plugins.plugintest.run()</span></tt> should work analogously.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">suite</span><span class="o">=</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">(</span><span class="n">tests</span><span class="o">=</span><span class="p">[]),</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">PrintEnvPlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">{}</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 0 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">env</span><span class="o">=</span><span class="p">{},</span>
+<span class="gp">... </span> <span class="n">suite</span><span class="o">=</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">(</span><span class="n">tests</span><span class="o">=</span><span class="p">[]),</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">PrintEnvPlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">{}</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 0 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">env</span><span class="o">=</span><span class="p">{</span><span class="s">&quot;foo&quot;</span><span class="p">:</span> <span class="s">&quot;bar&quot;</span><span class="p">},</span>
+<span class="gp">... </span> <span class="n">suite</span><span class="o">=</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">(</span><span class="n">tests</span><span class="o">=</span><span class="p">[]),</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">PrintEnvPlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">{&#39;foo&#39;: &#39;bar&#39;}</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 0 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+<p>Clean up.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">os</span><span class="o">.</span><span class="n">environ</span> <span class="o">=</span> <span class="n">old_environ</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/selector_plugin.html b/doc/selector_plugin.html
new file mode 100644
index 0000000..6b4762d
--- /dev/null
+++ b/doc/selector_plugin.html
@@ -0,0 +1,151 @@
+<html>
+ <head>
+ <title>nose: Using a Custom Selector</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: Using a Custom Selector</h1>
+
+ <p>By default, nose uses a <cite>nose.selector.Selector</cite> instance to decide
+what is and is not a test. The default selector is fairly simple: for
+the most part, if an object's name matches the <tt class="docutils literal"><span class="pre">testMatch</span></tt> regular
+expression defined in the active <cite>nose.config.Config</cite> instance, the
+object is selected as a test.</p>
+<p>This behavior is fine for new projects, but may be undesireable for
+older projects with a different test naming scheme. Fortunately, you
+can easily override this behavior by providing a custom selector using
+a plugin.</p>
+<p>In this example, the project to be tested consists of a module and
+package and associated tests, layed out like this:</p>
+<pre class="literal-block">
+|-- mymodule.py
+|-- mypackage
+| |-- __init__.py
+| |-- math
+| | |-- __init__.py
+| | `-- basic.py
+| `-- strings.py
+`-- tests
+ |-- testlib.py
+ |-- math
+ | `-- basic.py
+ |-- mymodule
+ | `-- my_function.py
+ `-- strings
+ `-- cat.py
+</pre>
+<p>The project is located in the <tt class="docutils literal"><span class="pre">support</span></tt> directory next to this test file.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">support</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;support&#39;</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>Because the test modules do not include <tt class="docutils literal"><span class="pre">test</span></tt> in their names,
+nose's default selector is unable to discover this project's tests.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p>The run() function in <a class="reference" href="module_nose.plugins.plugintest.html">nose.plugins.plugintest</a> reformats test result
+output to remove timings, which will vary from run to run, and
+redirects the output to stdout.</p>
+<blockquote class="last">
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+</pre></div>
+</blockquote>
+</div>
+<!-- -->
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">argv</span> <span class="o">=</span> <span class="p">[</span><span class="n">__file__</span><span class="p">,</span> <span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="n">support</span><span class="p">]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">)</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 0 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+<p>The tests for the example project follow a few basic conventions:</p>
+<ul class="simple">
+<li>The are all located under the tests/ directory.</li>
+<li>Test modules are organized into groups under directories named for
+the module or package they test.</li>
+<li>testlib is <em>not</em> a test module, but it must be importable by the
+test modules.</li>
+<li>Test modules contain unitest.TestCase classes that are tests, and
+may contain other functions or classes that are NOT tests, no matter
+how they are named.</li>
+</ul>
+<p>We can codify those conventions in a selector class.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.selector</span> <span class="k">import</span> <span class="n">Selector</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">MySelector</span><span class="p">(</span><span class="n">Selector</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantDirectory</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dirname</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># we want the tests directory and all directories</span>
+<span class="gp">... </span> <span class="c"># beneath it, and no others</span>
+<span class="gp">... </span> <span class="n">parts</span> <span class="o">=</span> <span class="n">dirname</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">sep</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="s">&#39;tests&#39;</span> <span class="ow">in</span> <span class="n">parts</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantFile</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># we want python modules under tests/, except testlib</span>
+<span class="gp">... </span> <span class="n">parts</span> <span class="o">=</span> <span class="n">filename</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">sep</span><span class="p">)</span>
+<span class="gp">... </span> <span class="n">base</span><span class="p">,</span> <span class="n">ext</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">splitext</span><span class="p">(</span><span class="n">parts</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="s">&#39;tests&#39;</span> <span class="ow">in</span> <span class="n">parts</span> <span class="ow">and</span> <span class="n">ext</span> <span class="o">==</span> <span class="s">&#39;.py&#39;</span> <span class="ow">and</span> <span class="n">base</span> <span class="o">!=</span> <span class="s">&#39;testlib&#39;</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantModule</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">module</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># wantDirectory and wantFile above will ensure that</span>
+<span class="gp">... </span> <span class="c"># we never see an unwanted module</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantFunction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">function</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># never collect functions</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="bp">False</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantClass</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cls</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># only collect TestCase subclasses</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="nb">issubclass</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>To use our selector class, we need a plugin that can inject it into
+the test loader.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">UseMySelector</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span> <span class="c"># always on</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">prepareTestLoader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">loader</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">loader</span><span class="o">.</span><span class="n">selector</span> <span class="o">=</span> <span class="n">MySelector</span><span class="p">(</span><span class="n">loader</span><span class="o">.</span><span class="n">config</span><span class="p">)</span>
+</pre></div>
+</blockquote>
+<p>Now we can execute a test run using the custom selector, and the
+project's tests will be collected.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">,</span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">UseMySelector</span><span class="p">()])</span>
+<span class="go">test_add (basic.TestBasicMath) ... ok</span>
+<span class="go">test_sub (basic.TestBasicMath) ... ok</span>
+<span class="go">test_tuple_groups (my_function.MyFunction) ... ok</span>
+<span class="go">test_cat (cat.StringsCat) ... ok</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 4 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/site.css b/doc/site.css
index e4b342e..87ca065 100644
--- a/doc/site.css
+++ b/doc/site.css
@@ -57,7 +57,7 @@ h1 {
pre.literal-block, pre.doctest-block
{
font-size: small;
- background: #ddd;
+ background: #f4fff4;
}
#menu ul {
@@ -274,63 +274,62 @@ pre.literal-block, pre.doctest-block
color: #666;
margin-bottom: 0px;
}
-.highlight { background: #f8f8f8; }
-.highlight .c { color: #408080; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
-.highlight .k { color: #008000; font-weight: bold } /* Keyword */
-.highlight .o { color: #666666 } /* Operator */
-.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
-.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
-.highlight .gd { color: #A00000 } /* Generic.Deleted */
+
+.highlight { background: #f4fff4; }
+.highlight .c { color: #999988; font-style: italic } /* Comment */
+.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.highlight .k { font-weight: bold } /* Keyword */
+.highlight .o { font-weight: bold } /* Operator */
+.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
+.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #FF0000 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #808080 } /* Generic.Output */
-.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gr { color: #aa0000 } /* Generic.Error */
+.highlight .gh { color: #999999 } /* Generic.Heading */
+.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0040D0 } /* Generic.Traceback */
-.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.highlight .kp { color: #008000 } /* Keyword.Pseudo */
-.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #008000; font-weight: bold } /* Keyword.Type */
-.highlight .m { color: #666666 } /* Literal.Number */
-.highlight .s { color: #BA2121 } /* Literal.String */
-.highlight .na { color: #7D9029 } /* Name.Attribute */
-.highlight .nb { color: #008000 } /* Name.Builtin */
-.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.highlight .no { color: #880000 } /* Name.Constant */
-.highlight .nd { color: #AA22FF } /* Name.Decorator */
-.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
-.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.highlight .nf { color: #0000FF } /* Name.Function */
-.highlight .nl { color: #A0A000 } /* Name.Label */
-.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #19177C } /* Name.Variable */
-.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
+.highlight .gt { color: #aa0000 } /* Generic.Traceback */
+.highlight .kc { font-weight: bold } /* Keyword.Constant */
+.highlight .kd { font-weight: bold } /* Keyword.Declaration */
+.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
+.highlight .m { color: #009999 } /* Literal.Number */
+.highlight .s { color: #bb8844 } /* Literal.String */
+.highlight .na { color: #008080 } /* Name.Attribute */
+.highlight .nb { color: #999999 } /* Name.Builtin */
+.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
+.highlight .no { color: #008080 } /* Name.Constant */
+.highlight .ni { color: #800080 } /* Name.Entity */
+.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
+.highlight .nn { color: #555555 } /* Name.Namespace */
+.highlight .nt { color: #000080 } /* Name.Tag */
+.highlight .nv { color: #008080 } /* Name.Variable */
+.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mf { color: #666666 } /* Literal.Number.Float */
-.highlight .mh { color: #666666 } /* Literal.Number.Hex */
-.highlight .mi { color: #666666 } /* Literal.Number.Integer */
-.highlight .mo { color: #666666 } /* Literal.Number.Oct */
-.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
-.highlight .sc { color: #BA2121 } /* Literal.String.Char */
-.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
-.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
-.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.highlight .sx { color: #008000 } /* Literal.String.Other */
-.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
-.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
-.highlight .ss { color: #19177C } /* Literal.String.Symbol */
-.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #19177C } /* Name.Variable.Class */
-.highlight .vg { color: #19177C } /* Name.Variable.Global */
-.highlight .vi { color: #19177C } /* Name.Variable.Instance */
-.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
+.highlight .mf { color: #009999 } /* Literal.Number.Float */
+.highlight .mh { color: #009999 } /* Literal.Number.Hex */
+.highlight .mi { color: #009999 } /* Literal.Number.Integer */
+.highlight .mo { color: #009999 } /* Literal.Number.Oct */
+.highlight .sb { color: #bb8844 } /* Literal.String.Backtick */
+.highlight .sc { color: #bb8844 } /* Literal.String.Char */
+.highlight .sd { color: #bb8844 } /* Literal.String.Doc */
+.highlight .s2 { color: #bb8844 } /* Literal.String.Double */
+.highlight .se { color: #bb8844 } /* Literal.String.Escape */
+.highlight .sh { color: #bb8844 } /* Literal.String.Heredoc */
+.highlight .si { color: #bb8844 } /* Literal.String.Interpol */
+.highlight .sx { color: #bb8844 } /* Literal.String.Other */
+.highlight .sr { color: #808000 } /* Literal.String.Regex */
+.highlight .s1 { color: #bb8844 } /* Literal.String.Single */
+.highlight .ss { color: #bb8844 } /* Literal.String.Symbol */
+.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #008080 } /* Name.Variable.Class */
+.highlight .vg { color: #008080 } /* Name.Variable.Global */
+.highlight .vi { color: #008080 } /* Name.Variable.Instance */
+.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
diff --git a/doc/unwanted_package.html b/doc/unwanted_package.html
new file mode 100644
index 0000000..7b9bf4c
--- /dev/null
+++ b/doc/unwanted_package.html
@@ -0,0 +1,102 @@
+<html>
+ <head>
+ <title>nose: Excluding Unwanted Packages</title>
+ <link rel="stylesheet" href="site.css" type="text/css"></link>
+ </head>
+ <body>
+
+ <div id="menu">
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
+
+ </div>
+
+ <div id="main">
+ <h1>nose: Excluding Unwanted Packages</h1>
+
+ <p>Normally, nose discovery descends into all packages. Plugins can
+change this behavior by implementing <a class="reference" href="plugin_interface.html#wantDirectory">wantDirectory()</a>.</p>
+<p>In this example, we have a wanted package called <tt class="docutils literal"><span class="pre">wanted_package</span></tt>
+and an unwanted package called <tt class="docutils literal"><span class="pre">unwanted_package</span></tt>.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">support</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;support&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">support_files</span> <span class="o">=</span> <span class="p">[</span><span class="n">d</span> <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="n">support</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="ow">not</span> <span class="n">d</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">support_files</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">support_files</span>
+<span class="go">[&#39;unwanted_package&#39;, &#39;wanted_package&#39;]</span>
+</pre></div>
+</blockquote>
+<p>When we run nose normally, tests are loaded from both packages.</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p>The run() function in <a class="reference" href="module_nose.plugins.plugintest.html">nose.plugins.plugintest</a> reformats test result
+output to remove timings, which will vary from run to run, and
+redirects the output to stdout.</p>
+<blockquote class="last">
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins.plugintest</span> <span class="k">import</span> <span class="n">run</span>
+</pre></div>
+</blockquote>
+</div>
+<!-- -->
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">argv</span> <span class="o">=</span> <span class="p">[</span><span class="n">__file__</span><span class="p">,</span> <span class="s">&#39;-v&#39;</span><span class="p">,</span> <span class="n">support</span><span class="p">]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">)</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">unwanted_package.test_spam.test_spam ... ok</span>
+<span class="go">wanted_package.test_eggs.test_eggs ... ok</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 2 tests in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+<p>To exclude the tests in the unwanted package, we can write a simple
+plugin that implements <a class="reference" href="plugin_interface.html#wantDirectory">wantDirectory()</a> and returns <tt class="docutils literal"><span class="pre">False</span></tt> if
+the basename of the directory is <tt class="docutils literal"><span class="pre">&quot;unwanted_package&quot;</span></tt>. This will
+prevent nose from descending into the unwanted package.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">UnwantedPackagePlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="c"># no command line arg needed to activate plugin</span>
+<span class="gp">... </span> <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;unwanted-package&quot;</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span> <span class="c"># always on</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">wantDirectory</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dirname</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">want</span> <span class="o">=</span> <span class="bp">None</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">dirname</span><span class="p">)</span> <span class="o">==</span> <span class="s">&quot;unwanted_package&quot;</span><span class="p">:</span>
+<span class="gp">... </span> <span class="n">want</span> <span class="o">=</span> <span class="bp">False</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="n">want</span>
+</pre></div>
+</blockquote>
+<p>In the next test run we use the plugin, and the unwanted package is
+not discovered.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">run</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">argv</span><span class="p">,</span>
+<span class="gp">... </span> <span class="n">plugins</span><span class="o">=</span><span class="p">[</span><span class="n">UnwantedPackagePlugin</span><span class="p">()])</span> <span class="c"># doctest: +REPORT_NDIFF</span>
+<span class="go">wanted_package.test_eggs.test_eggs ... ok</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">----------------------------------------------------------------------</span>
+<span class="go">Ran 1 test in ...s</span>
+<span class="go">&lt;BLANKLINE&gt;</span>
+<span class="go">OK</span>
+</pre></div>
+</blockquote>
+
+
+ </div>
+ <script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-2236166-1";
+ urchinTracker();
+ </script>
+ </body>
+</html>
+
diff --git a/doc/writing_plugins.html b/doc/writing_plugins.html
index b4eacf1..2e6d24c 100644
--- a/doc/writing_plugins.html
+++ b/doc/writing_plugins.html
@@ -6,9 +6,9 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0b1</b></p>
- <p>Last update: <b>Sat Aug 11 21:09:27 2007</b></p>
- <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="errorclassplugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul>
+ <p>This document covers nose version <b>0.10.0</b></p>
+ <p>Last update: <b>Sat Oct 13 17:37:50 2007</b></p>
+ <h2>Plugins</h2><ul><li><a href="plugin_attrib.html">Builtin Plugin: attrib</a></li><li><a href="plugin_capture.html">Builtin Plugin: capture</a></li><li><a href="plugin_cover.html">Builtin Plugin: cover</a></li><li><a href="plugin_debug.html">Builtin Plugin: debug</a></li><li><a href="plugin_deprecated.html">Builtin Plugin: deprecated</a></li><li><a href="plugin_doctests.html">Builtin Plugin: doctests</a></li><li><a href="plugin_failuredetail.html">Builtin Plugin: failuredetail</a></li><li><a href="plugin_isolate.html">Builtin Plugin: isolate</a></li><li><a href="plugin_prof.html">Builtin Plugin: prof</a></li><li><a href="plugin_skip.html">Builtin Plugin: skip</a></li><li><a href="plugin_testid.html">Builtin Plugin: testid</a></li><li><a href="error_class_plugin.html">ErrorClass Plugins</a></li><li><a href="plugin_interface.html">Plugin Interface</a></li><li><a href="writing_plugins.html">Writing Plugins</a></li></ul><h2>Modules</h2><ul><li><a href="module_nose.case.html">Module: nose.case</a></li><li><a href="module_nose.commands.html">Module: nose.commands</a></li><li><a href="module_nose.config.html">Module: nose.config</a></li><li><a href="module_nose.core.html">Module: nose.core</a></li><li><a href="module_nose.exc.html">Module: nose.exc</a></li><li><a href="module_nose.importer.html">Module: nose.importer</a></li><li><a href="module_nose.inspector.html">Module: nose.inspector</a></li><li><a href="module_nose.loader.html">Module: nose.loader</a></li><li><a href="module_nose.plugins.manager.html">Module: nose.plugins.manager</a></li><li><a href="module_nose.plugins.plugintest.html">Module: nose.plugins.plugintest</a></li><li><a href="module_nose.proxy.html">Module: nose.proxy</a></li><li><a href="module_nose.result.html">Module: nose.result</a></li><li><a href="module_nose.selector.html">Module: nose.selector</a></li><li><a href="module_nose.suite.html">Module: nose.suite</a></li><li><a href="module_nose.tools.html">Module: nose.tools</a></li><li><a href="module_nose.twistedtools.html">Module: nose.twistedtools</a></li><li><a href="module_nose.util.html">Module: nose.util</a></li></ul><h2>Plugin Examples</h2><ul><li><a href="unwanted_package.html">Excluding Unwanted Packages</a></li><li><a href="init_plugin.html">Running Initialization Code Before the Test Run</a></li><li><a href="selector_plugin.html">Using a Custom Selector</a></li><li><a href="plugin_exceptions.html">When Plugins Fail</a></li><li><a href="plugintest_environment.html">nose.plugins.plugintest and os.environ</a></li></ul>
</div>
@@ -20,7 +20,7 @@ reporting. There are two basic rules for plugins:</p>
<ul class="simple">
<li>Plugin classes should subclass <a class="reference" href="http://python-nose.googlecode.com/svn/trunk/nose/plugins/base.py">nose.plugins.Plugin</a>.</li>
<li>Plugins may implement any of the methods described in the class
-PluginInterface in nose.plugins.base. Please note that this class is for
+<a class="reference" href="plugin_interface.html">PluginInterface</a> in nose.plugins.base. Please note that this class is for
documentary purposes only; plugins may not subclass PluginInterface.</li>
</ul>
<div class="section">
@@ -81,7 +81,7 @@ to the dummy stream, while you send your desired output to the real stream.</p>
<p>Example: <a class="reference" href="http://python-nose.googlecode.com/svn/trunk/examples/html_plugin/htmlplug.py">examples/html_plugin/htmlplug.py</a></p>
</li>
<li><p class="first">Writing a plugin that handles exceptions</p>
-<p>Subclass <a class="reference" href="errorclassplugin.html">ErrorClassPlugin</a>.</p>
+<p>Subclass <a class="reference" href="error_class_plugin.html">ErrorClassPlugin</a>.</p>
<p>Examples: <a class="reference" href="plugin_deprecated.html">nose.plugins.deprecated</a>, <a class="reference" href="plugin_skip.html">nose.plugins.skip</a></p>
</li>
<li><p class="first">Writing a plugin that adds detail to error reports</p>
@@ -127,39 +127,91 @@ there is a mixin for unittest.TestCase called PluginTester that's
designed to test plugins in their native runtime environment.</p>
<p>Here's a simple example with a do-nothing plugin and a composed suite.</p>
<blockquote>
-<pre class="doctest-block">
-&gt;&gt;&gt; import unittest
-&gt;&gt;&gt; from nose.plugins import Plugin, PluginTester
-&gt;&gt;&gt; class FooPlugin(Plugin):
-... pass
-&gt;&gt;&gt; class TestPluginFoo(PluginTester, unittest.TestCase):
-... activate = '--with-foo'
-... plugins = [FooPlugin()]
-... def test_foo(self):
-... for line in self.output:
-... # i.e. check for patterns
-... pass
-...
-... # or check for a line containing ...
-... assert &quot;ValueError&quot; in self.output
-... def makeSuite(self):
-... class TC(unittest.TestCase):
-... def runTest(self):
-... raise ValueError(&quot;I hate foo&quot;)
-... return unittest.TestSuite([TC()])
-...
-&gt;&gt;&gt; res = unittest.TestResult()
-&gt;&gt;&gt; case = TestPluginFoo('test_foo')
-&gt;&gt;&gt; case(res)
-&gt;&gt;&gt; res.errors
-[]
-&gt;&gt;&gt; res.failures
-[]
-&gt;&gt;&gt; res.wasSuccessful()
-True
-&gt;&gt;&gt; res.testsRun
-1
-</pre>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span><span class="p">,</span> <span class="n">PluginTester</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">FooPlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">pass</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TestPluginFoo</span><span class="p">(</span><span class="n">PluginTester</span><span class="p">,</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">activate</span> <span class="o">=</span> <span class="s">&#39;--with-foo&#39;</span>
+<span class="gp">... </span> <span class="n">plugins</span> <span class="o">=</span> <span class="p">[</span><span class="n">FooPlugin</span><span class="p">()]</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">test_foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">output</span><span class="p">:</span>
+<span class="gp">... </span> <span class="c"># i.e. check for patterns</span>
+<span class="gp">... </span> <span class="k">pass</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="c"># or check for a line containing ...</span>
+<span class="gp">... </span> <span class="k">assert</span> <span class="s">&quot;ValueError&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">output</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">makeSuite</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">class</span> <span class="nc">TC</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">runTest</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;I hate foo&quot;</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">([</span><span class="n">TC</span><span class="p">()])</span>
+<span class="go">...</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestResult</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">case</span> <span class="o">=</span> <span class="n">TestPluginFoo</span><span class="p">(</span><span class="s">&#39;test_foo&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">case</span><span class="p">(</span><span class="n">res</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">errors</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">failures</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">wasSuccessful</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">testsRun</span>
+<span class="go">1</span>
+</pre></div>
+</blockquote>
+<p>And here is a more complex example of testing a plugin that has extra
+arguments and reads environment variables.</p>
+<blockquote>
+<div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">import</span> <span class="nn">unittest</span><span class="o">,</span> <span class="nn">os</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">from</span> <span class="nn">nose.plugins</span> <span class="k">import</span> <span class="n">Plugin</span><span class="p">,</span> <span class="n">PluginTester</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">FancyOutputter</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;fancy&quot;</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">Plugin</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">conf</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">enabled</span><span class="p">:</span>
+<span class="gp">... </span> <span class="k">return</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">fanciness</span> <span class="o">=</span> <span class="mi">1</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">more_fancy</span><span class="p">:</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">fanciness</span> <span class="o">=</span> <span class="mi">2</span>
+<span class="gp">... </span> <span class="k">if</span> <span class="s">&#39;EVEN_FANCIER&#39;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="p">:</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">fanciness</span> <span class="o">=</span> <span class="mi">3</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">):</span>
+<span class="gp">... </span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span> <span class="o">=</span> <span class="n">env</span>
+<span class="gp">... </span> <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&#39;--more-fancy&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&#39;store_true&#39;</span><span class="p">)</span>
+<span class="gp">... </span> <span class="n">Plugin</span><span class="o">.</span><span class="n">options</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">env</span><span class="o">=</span><span class="n">env</span><span class="p">)</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">report</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">stream</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">stream</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;FANCY &quot;</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">fanciness</span><span class="p">)</span>
+<span class="go">...</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TestFancyOutputter</span><span class="p">(</span><span class="n">PluginTester</span><span class="p">,</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="n">activate</span> <span class="o">=</span> <span class="s">&#39;--with-fancy&#39;</span> <span class="c"># enables the plugin</span>
+<span class="gp">... </span> <span class="n">plugins</span> <span class="o">=</span> <span class="p">[</span><span class="n">FancyOutputter</span><span class="p">()]</span>
+<span class="gp">... </span> <span class="n">args</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;--more-fancy&#39;</span><span class="p">]</span>
+<span class="gp">... </span> <span class="n">env</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;EVEN_FANCIER&#39;</span><span class="p">:</span> <span class="s">&#39;1&#39;</span><span class="p">}</span>
+<span class="go">...</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">test_fancy_output</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">assert</span> <span class="s">&quot;FANCY FANCY FANCY&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">output</span><span class="p">,</span> <span class="p">(</span>
+<span class="gp">... </span> <span class="s">&quot;got: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">output</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">makeSuite</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">class</span> <span class="nc">TC</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">def</span> <span class="nf">runTest</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="gp">... </span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s">&quot;I hate fancy stuff&quot;</span><span class="p">)</span>
+<span class="gp">... </span> <span class="k">return</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestSuite</span><span class="p">([</span><span class="n">TC</span><span class="p">()])</span>
+<span class="go">...</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">unittest</span><span class="o">.</span><span class="n">TestResult</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">case</span> <span class="o">=</span> <span class="n">TestFancyOutputter</span><span class="p">(</span><span class="s">&#39;test_fancy_output&#39;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">case</span><span class="p">(</span><span class="n">res</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">errors</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">failures</span>
+<span class="go">[]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">wasSuccessful</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">testsRun</span>
+<span class="go">1</span>
+</pre></div>
</blockquote>
</div>
diff --git a/functional_tests/doc_tests/test_init_plugin/init_plugin.rst b/functional_tests/doc_tests/test_init_plugin/init_plugin.rst
new file mode 100644
index 0000000..99418ae
--- /dev/null
+++ b/functional_tests/doc_tests/test_init_plugin/init_plugin.rst
@@ -0,0 +1,156 @@
+Running Initialization Code Before the Test Run
+-----------------------------------------------
+
+Many applications, especially those using web frameworks like Pylons_
+or Django_, can't be tested without first being configured or
+otherwise initialized. Plugins can fulfill this requirement by
+implementing `begin()`_.
+
+In this example, we'll use a very simple example: a widget class that
+can't be tested without a configuration.
+
+Here's the widget class. It's configured at the class or instance
+level by setting the ``cfg`` attribute to a dictionary.
+
+ >>> class ConfigurableWidget(object):
+ ... cfg = None
+ ... def can_frobnicate(self):
+ ... return self.cfg.get('can_frobnicate', True)
+ ... def likes_cheese(self):
+ ... return self.cfg.get('likes_cheese', True)
+
+The tests verify that the widget's methods can be called without
+raising any exceptions.
+
+ >>> import unittest
+ >>> class TestConfigurableWidget(unittest.TestCase):
+ ... def setUp(self):
+ ... self.widget = ConfigurableWidget()
+ ... def test_can_frobnicate(self):
+ ... """Widgets can frobnicate (or not)"""
+ ... self.widget.can_frobnicate()
+ ... def test_likes_cheese(self):
+ ... """Widgets might like cheese"""
+ ... self.widget.likes_cheese()
+
+The tests are bundled into a suite that we can pass to the test runner.
+
+ >>> def suite():
+ ... return unittest.TestSuite([
+ ... TestConfigurableWidget('test_can_frobnicate'),
+ ... TestConfigurableWidget('test_likes_cheese')])
+
+When we run tests without first configuring the ConfigurableWidget,
+the tests fail.
+
+.. Note ::
+
+ The run() function in `nose.plugins.plugintest`_ reformats test result
+ output to remove timings, which will vary from run to run, and
+ redirects the output to stdout.
+
+ >>> from nose.plugins.plugintest import run
+
+..
+
+ >>> argv = [__file__, '-v']
+ >>> run(argv=argv, suite=suite()) # doctest: +REPORT_NDIFF
+ Widgets can frobnicate (or not) ... ERROR
+ Widgets might like cheese ... ERROR
+ <BLANKLINE>
+ ======================================================================
+ ERROR: Widgets can frobnicate (or not)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+ AttributeError: 'NoneType' object has no attribute 'get'
+ <BLANKLINE>
+ ======================================================================
+ ERROR: Widgets might like cheese
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+ AttributeError: 'NoneType' object has no attribute 'get'
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 2 tests in ...s
+ <BLANKLINE>
+ FAILED (errors=2)
+
+To configure the widget system before running tests, write a plugin
+that implements `begin()`_ and initializes the system with a
+hard-coded configuration. (Later, we'll write a better plugin that
+accepts a command-line argument specifying the configuration file.)
+
+ >>> from nose.plugins import Plugin
+ >>> class ConfiguringPlugin(Plugin):
+ ... enabled = True
+ ... def configure(self, options, conf):
+ ... pass # always on
+ ... def begin(self):
+ ... ConfigurableWidget.cfg = {}
+
+Now configure and execute a new test run using the plugin, which will
+inject the hard-coded configuration.
+
+ >>> run(argv=argv, suite=suite(),
+ ... plugins=[ConfiguringPlugin()]) # doctest: +REPORT_NDIFF
+ Widgets can frobnicate (or not) ... ok
+ Widgets might like cheese ... ok
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 2 tests in ...s
+ <BLANKLINE>
+ OK
+
+This time the tests pass, because the widget class is configured.
+
+But the ConfiguringPlugin is pretty lame -- the configuration it
+installs is hard coded. A better plugin would allow the user to
+specify a configuration file on the command line:
+
+ >>> class BetterConfiguringPlugin(Plugin):
+ ... def options(self, parser, env={}):
+ ... parser.add_option('--widget-config', action='store',
+ ... dest='widget_config', default=None,
+ ... help='Specify path to widget config file')
+ ... def configure(self, options, conf):
+ ... if options.widget_config:
+ ... self.load_config(options.widget_config)
+ ... self.enabled = True
+ ... def begin(self):
+ ... ConfigurableWidget.cfg = self.cfg
+ ... def load_config(self, path):
+ ... from ConfigParser import ConfigParser
+ ... p = ConfigParser()
+ ... p.read([path])
+ ... self.cfg = dict(p.items('DEFAULT'))
+
+To use the plugin, we need a config file.
+
+ >>> import os
+ >>> cfg_file = os.path.join(os.path.dirname(__file__), 'example.cfg')
+ >>> open(cfg_file, 'w').write("""\
+ ... [DEFAULT]
+ ... can_frobnicate = 1
+ ... likes_cheese = 0
+ ... """)
+
+Now we can execute a test run using that configuration, after first
+resetting the widget system to an unconfigured state.
+
+ >>> ConfigurableWidget.cfg = None
+ >>> argv = [__file__, '-v', '--widget-config', cfg_file]
+ >>> run(argv=argv, suite=suite(),
+ ... plugins=[BetterConfiguringPlugin()]) # doctest: +REPORT_NDIFF
+ Widgets can frobnicate (or not) ... ok
+ Widgets might like cheese ... ok
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 2 tests in ...s
+ <BLANKLINE>
+ OK
+
+.. _Pylons: http://pylonshq.com/
+.. _Django: http://www.djangoproject.com/
+.. _`begin()`: plugin_interface.html#begin
diff --git a/functional_tests/doc_tests/test_issue089/support/unwanted_package/__init__.py b/functional_tests/doc_tests/test_issue089/support/unwanted_package/__init__.py
new file mode 100644
index 0000000..2ae2839
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue089/support/unwanted_package/__init__.py
@@ -0,0 +1 @@
+pass
diff --git a/functional_tests/doc_tests/test_issue089/support/unwanted_package/test_spam.py b/functional_tests/doc_tests/test_issue089/support/unwanted_package/test_spam.py
new file mode 100644
index 0000000..cfd1cc1
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue089/support/unwanted_package/test_spam.py
@@ -0,0 +1,3 @@
+def test_spam():
+ assert True
+
diff --git a/functional_tests/doc_tests/test_issue089/support/wanted_package/__init__.py b/functional_tests/doc_tests/test_issue089/support/wanted_package/__init__.py
new file mode 100644
index 0000000..2ae2839
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue089/support/wanted_package/__init__.py
@@ -0,0 +1 @@
+pass
diff --git a/functional_tests/doc_tests/test_issue089/support/wanted_package/test_eggs.py b/functional_tests/doc_tests/test_issue089/support/wanted_package/test_eggs.py
new file mode 100644
index 0000000..bb65550
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue089/support/wanted_package/test_eggs.py
@@ -0,0 +1,3 @@
+def test_eggs():
+ assert True
+
diff --git a/functional_tests/doc_tests/test_issue089/unwanted_package.rst b/functional_tests/doc_tests/test_issue089/unwanted_package.rst
new file mode 100644
index 0000000..29cab70
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue089/unwanted_package.rst
@@ -0,0 +1,72 @@
+Excluding Unwanted Packages
+---------------------------
+
+Normally, nose discovery descends into all packages. Plugins can
+change this behavior by implementing `wantDirectory()`_.
+
+In this example, we have a wanted package called ``wanted_package``
+and an unwanted package called ``unwanted_package``.
+
+ >>> import os
+ >>> support = os.path.join(os.path.dirname(__file__), 'support')
+ >>> support_files = [d for d in os.listdir(support)
+ ... if not d.startswith('.')]
+ >>> support_files.sort()
+ >>> support_files
+ ['unwanted_package', 'wanted_package']
+
+When we run nose normally, tests are loaded from both packages.
+
+.. Note ::
+
+ The run() function in `nose.plugins.plugintest`_ reformats test result
+ output to remove timings, which will vary from run to run, and
+ redirects the output to stdout.
+
+ >>> from nose.plugins.plugintest import run
+
+..
+
+ >>> argv = [__file__, '-v', support]
+ >>> run(argv=argv) # doctest: +REPORT_NDIFF
+ unwanted_package.test_spam.test_spam ... ok
+ wanted_package.test_eggs.test_eggs ... ok
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 2 tests in ...s
+ <BLANKLINE>
+ OK
+
+To exclude the tests in the unwanted package, we can write a simple
+plugin that implements `wantDirectory()`_ and returns ``False`` if
+the basename of the directory is ``"unwanted_package"``. This will
+prevent nose from descending into the unwanted package.
+
+ >>> from nose.plugins import Plugin
+ >>> class UnwantedPackagePlugin(Plugin):
+ ... # no command line arg needed to activate plugin
+ ... enabled = True
+ ... name = "unwanted-package"
+ ...
+ ... def configure(self, options, conf):
+ ... pass # always on
+ ...
+ ... def wantDirectory(self, dirname):
+ ... want = None
+ ... if os.path.basename(dirname) == "unwanted_package":
+ ... want = False
+ ... return want
+
+In the next test run we use the plugin, and the unwanted package is
+not discovered.
+
+ >>> run(argv=argv,
+ ... plugins=[UnwantedPackagePlugin()]) # doctest: +REPORT_NDIFF
+ wanted_package.test_eggs.test_eggs ... ok
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 1 test in ...s
+ <BLANKLINE>
+ OK
+
+.. _`wantDirectory()` : plugin_interface.html#wantDirectory
diff --git a/functional_tests/doc_tests/test_issue097/plugintest_environment.rst b/functional_tests/doc_tests/test_issue097/plugintest_environment.rst
new file mode 100644
index 0000000..da7982c
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue097/plugintest_environment.rst
@@ -0,0 +1,110 @@
+nose.plugins.plugintest and os.environ
+--------------------------------------
+
+`nose.plugins.plugintest.PluginTester`_ and
+`nose.plugins.plugintest.run()`_ are utilities for testing nose
+plugins. When testing plugins, it should be possible to control the
+environment seen plugins under test, and that environment should never
+be affected by ``os.environ``.
+
+ >>> import os
+ >>> import unittest
+ >>> from nose.config import Config
+ >>> from nose.plugins import Plugin
+ >>> from nose.plugins.builtin import FailureDetail, Capture
+ >>> from nose.plugins.plugintest import PluginTester
+
+Our test plugin takes no command-line arguments and simply prints the
+environment it's given by nose.
+
+ >>> class PrintEnvPlugin(Plugin):
+ ... name = "print-env"
+ ...
+ ... # no command line arg needed to activate plugin
+ ... enabled = True
+ ... def configure(self, options, conf):
+ ... if not self.can_configure:
+ ... return
+ ... self.conf = conf
+ ...
+ ... def options(self, parser, env={}):
+ ... print env
+
+The class under test, PluginTester, is designed to be used by
+subclassing.
+
+ >>> class Tester(PluginTester):
+ ... activate = "-v"
+ ... plugins = [PrintEnvPlugin(),
+ ... FailureDetail(),
+ ... Capture(),
+ ... ]
+ ...
+ ... def makeSuite(self):
+ ... return unittest.TestSuite(tests=[])
+
+
+For the purposes of this test, we need a known ``os.environ``.
+
+ >>> old_environ = os.environ
+ >>> os.environ = {"spam": "eggs"}
+
+If ``env`` is not overridden, the default is an empty ``env``.
+
+ >>> tester = Tester()
+ >>> tester.setUp()
+ {}
+
+An empty ``env`` is respected...
+
+ >>> class EmptyEnvTester(Tester):
+ ... env = {}
+
+ >>> tester = EmptyEnvTester()
+ >>> tester.setUp()
+ {}
+
+... as is a non-empty ``env``.
+
+ >>> class NonEmptyEnvTester(Tester):
+ ... env = {"foo": "bar"}
+
+ >>> tester = NonEmptyEnvTester()
+ >>> tester.setUp()
+ {'foo': 'bar'}
+
+
+``nose.plugins.plugintest.run()`` should work analogously.
+
+ >>> from nose.plugins.plugintest import run
+
+ >>> run(suite=unittest.TestSuite(tests=[]),
+ ... plugins=[PrintEnvPlugin()]) # doctest: +REPORT_NDIFF
+ {}
+ ----------------------------------------------------------------------
+ Ran 0 tests in ...s
+ <BLANKLINE>
+ OK
+
+ >>> run(env={},
+ ... suite=unittest.TestSuite(tests=[]),
+ ... plugins=[PrintEnvPlugin()]) # doctest: +REPORT_NDIFF
+ {}
+ ----------------------------------------------------------------------
+ Ran 0 tests in ...s
+ <BLANKLINE>
+ OK
+
+ >>> run(env={"foo": "bar"},
+ ... suite=unittest.TestSuite(tests=[]),
+ ... plugins=[PrintEnvPlugin()]) # doctest: +REPORT_NDIFF
+ {'foo': 'bar'}
+ ----------------------------------------------------------------------
+ Ran 0 tests in ...s
+ <BLANKLINE>
+ OK
+
+
+Clean up.
+
+ >>> os.environ = old_environ
diff --git a/functional_tests/doc_tests/test_issue107/plugin_exceptions.rst b/functional_tests/doc_tests/test_issue107/plugin_exceptions.rst
new file mode 100644
index 0000000..4b1f132
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue107/plugin_exceptions.rst
@@ -0,0 +1,92 @@
+When Plugins Fail
+-----------------
+
+Plugin methods should not fail silently. When a plugin method raises
+an exception before or during the execution of a test, the exception
+will be wrapped in a `nose.case.Failure`_ instance and appear as a
+failing test. Exceptions raised at other times, such as in the
+preparation phase with ``prepareTestLoader`` or ``prepareTestResult``,
+or after a test executes, in ``afterTest`` will stop the entire test
+run.
+
+ >>> import os
+ >>> import sys
+ >>> from nose.plugins import Plugin
+ >>> from nose.plugins.plugintest import run
+
+Our first test plugins take no command-line arguments and raises
+AttributeError in beforeTest and afterTest.
+
+ >>> class EnabledPlugin(Plugin):
+ ... """Plugin that takes no command-line arguments"""
+ ...
+ ... enabled = True
+ ...
+ ... def configure(self, options, conf):
+ ... pass
+ ... def options(self, parser, env={}):
+ ... pass
+
+ >>> class FailBeforePlugin(EnabledPlugin):
+ ... name = "fail-before"
+ ...
+ ... def beforeTest(self, test):
+ ... raise AttributeError()
+
+ >>> class FailAfterPlugin(EnabledPlugin):
+ ... name = "fail-after"
+ ...
+ ... def afterTest(self, test):
+ ... raise AttributeError()
+
+Running tests with the fail-before plugin enabled will result in all
+tests failing.
+
+ >>> support = os.path.join(os.path.dirname(__file__), 'support')
+ >>> suitepath = os.path.join(support, 'test_spam.py')
+
+ >>> run(argv=['nosetests', suitepath],
+ ... plugins=[FailBeforePlugin()])
+ EE
+ ======================================================================
+ ERROR: test_spam.test_spam
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+ AttributeError
+ <BLANKLINE>
+ ======================================================================
+ ERROR: test_spam.test_eggs
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+ AttributeError
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 0 tests in ...s
+ <BLANKLINE>
+ FAILED (errors=2)
+
+But with the fail-after plugin, the entire test run will fail.
+
+ >>> run(argv=['nosetests', suitepath],
+ ... plugins=[FailAfterPlugin()])
+ Traceback (most recent call last):
+ ...
+ AttributeError
+
+Likewise since the next plugin fails in a preparatory method, outside
+of test execution, the entire test run fails when the plugin is used.
+
+ >>> class FailPreparationPlugin(EnabledPlugin):
+ ... name = "fail-prepare"
+ ...
+ ... def prepareTestLoader(self, loader):
+ ... raise TypeError("That loader is not my type")
+
+ >>> run(argv=['nosetests', suitepath],
+ ... plugins=[FailPreparationPlugin()])
+ Traceback (most recent call last):
+ ...
+ TypeError: That loader is not my type
+
diff --git a/functional_tests/doc_tests/test_issue107/support/test_spam.py b/functional_tests/doc_tests/test_issue107/support/test_spam.py
new file mode 100644
index 0000000..4c1b8fb
--- /dev/null
+++ b/functional_tests/doc_tests/test_issue107/support/test_spam.py
@@ -0,0 +1,5 @@
+def test_spam():
+ assert True
+
+def test_eggs():
+ pass
diff --git a/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst b/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst
new file mode 100644
index 0000000..6607bf8
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/selector_plugin.rst
@@ -0,0 +1,119 @@
+Using a Custom Selector
+-----------------------
+
+By default, nose uses a `nose.selector.Selector` instance to decide
+what is and is not a test. The default selector is fairly simple: for
+the most part, if an object's name matches the ``testMatch`` regular
+expression defined in the active `nose.config.Config` instance, the
+object is selected as a test.
+
+This behavior is fine for new projects, but may be undesireable for
+older projects with a different test naming scheme. Fortunately, you
+can easily override this behavior by providing a custom selector using
+a plugin.
+
+In this example, the project to be tested consists of a module and
+package and associated tests, layed out like this::
+
+ |-- mymodule.py
+ |-- mypackage
+ | |-- __init__.py
+ | |-- math
+ | | |-- __init__.py
+ | | `-- basic.py
+ | `-- strings.py
+ `-- tests
+ |-- testlib.py
+ |-- math
+ | `-- basic.py
+ |-- mymodule
+ | `-- my_function.py
+ `-- strings
+ `-- cat.py
+
+The project is located in the ``support`` directory next to this test file.
+
+ >>> import os
+ >>> support = os.path.join(os.path.dirname(__file__), 'support')
+
+Because the test modules do not include ``test`` in their names,
+nose's default selector is unable to discover this project's tests.
+
+.. Note ::
+
+ The run() function in `nose.plugins.plugintest`_ reformats test result
+ output to remove timings, which will vary from run to run, and
+ redirects the output to stdout.
+
+ >>> from nose.plugins.plugintest import run
+
+..
+
+ >>> argv = [__file__, '-v', support]
+ >>> run(argv=argv)
+ ----------------------------------------------------------------------
+ Ran 0 tests in ...s
+ <BLANKLINE>
+ OK
+
+The tests for the example project follow a few basic conventions:
+
+* The are all located under the tests/ directory.
+* Test modules are organized into groups under directories named for
+ the module or package they test.
+* testlib is *not* a test module, but it must be importable by the
+ test modules.
+* Test modules contain unitest.TestCase classes that are tests, and
+ may contain other functions or classes that are NOT tests, no matter
+ how they are named.
+
+We can codify those conventions in a selector class.
+
+ >>> from nose.selector import Selector
+ >>> import unittest
+ >>> class MySelector(Selector):
+ ... def wantDirectory(self, dirname):
+ ... # we want the tests directory and all directories
+ ... # beneath it, and no others
+ ... parts = dirname.split(os.path.sep)
+ ... return 'tests' in parts
+ ... def wantFile(self, filename):
+ ... # we want python modules under tests/, except testlib
+ ... parts = filename.split(os.path.sep)
+ ... base, ext = os.path.splitext(parts[-1])
+ ... return 'tests' in parts and ext == '.py' and base != 'testlib'
+ ... def wantModule(self, module):
+ ... # wantDirectory and wantFile above will ensure that
+ ... # we never see an unwanted module
+ ... return True
+ ... def wantFunction(self, function):
+ ... # never collect functions
+ ... return False
+ ... def wantClass(self, cls):
+ ... # only collect TestCase subclasses
+ ... return issubclass(cls, unittest.TestCase)
+
+To use our selector class, we need a plugin that can inject it into
+the test loader.
+
+ >>> from nose.plugins import Plugin
+ >>> class UseMySelector(Plugin):
+ ... enabled = True
+ ... def configure(self, options, conf):
+ ... pass # always on
+ ... def prepareTestLoader(self, loader):
+ ... loader.selector = MySelector(loader.config)
+
+Now we can execute a test run using the custom selector, and the
+project's tests will be collected.
+
+ >>> run(argv=argv, plugins=[UseMySelector()])
+ test_add (basic.TestBasicMath) ... ok
+ test_sub (basic.TestBasicMath) ... ok
+ test_tuple_groups (my_function.MyFunction) ... ok
+ test_cat (cat.StringsCat) ... ok
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 4 tests in ...s
+ <BLANKLINE>
+ OK
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/mymodule.py b/functional_tests/doc_tests/test_selector_plugin/support/mymodule.py
new file mode 100644
index 0000000..66b3c16
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/mymodule.py
@@ -0,0 +1,2 @@
+def my_function(a, b, c):
+ return (a, (b, c))
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/mypackage/__init__.py b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/__init__.py
new file mode 100644
index 0000000..2ae2839
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/__init__.py
@@ -0,0 +1 @@
+pass
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/__init__.py b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/__init__.py
new file mode 100644
index 0000000..04e0659
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/__init__.py
@@ -0,0 +1 @@
+from mypackage.math.basic import *
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/basic.py b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/basic.py
new file mode 100644
index 0000000..6cddd28
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/math/basic.py
@@ -0,0 +1,5 @@
+def add(a, b):
+ return a + b
+
+def sub(a, b):
+ return a - b
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py
new file mode 100644
index 0000000..8ffc4cc
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/mypackage/strings.py
@@ -0,0 +1,2 @@
+def cat(a, b):
+ return "%s%s" % (a, b)
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py b/functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py
new file mode 100644
index 0000000..7639ddc
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py
@@ -0,0 +1,17 @@
+import testlib
+from mypackage import math
+
+
+class TestBasicMath(testlib.Base):
+
+ def test_add(self):
+ self.assertEqual(math.add(1, 2), 3)
+
+ def test_sub(self):
+ self.assertEqual(math.sub(3, 1), 2)
+
+
+class TestHelperClass:
+ def __init__(self):
+ raise Exception(
+ "This test helper class should not be collected")
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py b/functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py
new file mode 100644
index 0000000..85808c9
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py
@@ -0,0 +1,7 @@
+import mymodule
+import testlib
+
+class MyFunction(testlib.Base):
+
+ def test_tuple_groups(self):
+ self.assertEqual(mymodule.my_function(1, 2, 3), (1, (2, 3)))
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py b/functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py
new file mode 100644
index 0000000..3b410e8
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py
@@ -0,0 +1,12 @@
+import testlib
+from mypackage import strings
+
+class StringsCat(testlib.Base):
+
+ def test_cat(self):
+ self.assertEqual(strings.cat('one', 'two'), 'onetwo')
+
+
+def test_helper_function():
+ raise Exception(
+ "This test helper function should not be collected")
diff --git a/functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py b/functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py
new file mode 100644
index 0000000..92c4f96
--- /dev/null
+++ b/functional_tests/doc_tests/test_selector_plugin/support/tests/testlib.py
@@ -0,0 +1,6 @@
+import unittest
+
+class Base(unittest.TestCase):
+ """Use this base class for all tests.
+ """
+ pass
diff --git a/functional_tests/test_plugintest.py b/functional_tests/test_plugintest.py
new file mode 100644
index 0000000..7d1a65b
--- /dev/null
+++ b/functional_tests/test_plugintest.py
@@ -0,0 +1,51 @@
+
+import unittest, os
+from nose.plugins import PluginTester, Plugin
+from nose.tools import eq_
+from cStringIO import StringIO
+
+class StubPlugin(Plugin):
+ def options(self, parser, env=os.environ):
+ super(StubPlugin, self).options(parser, env=env)
+ def configure(self, options, conf):
+ pass
+
+class SomePluginTestCase(PluginTester):
+ activate = None # set this to --with-yourplugin, etc
+ plugins = [] # list of plugin instances
+
+ def makeSuite(self):
+ class SomeTest(unittest.TestCase):
+ def runTest(self):
+ raise ValueError("Now do something, plugin!")
+ return unittest.TestSuite([SomeTest()])
+
+class TestPluginTester(unittest.TestCase):
+ def _runPluginTest(self, test_case):
+ loader = unittest.TestLoader()
+ suite = loader.loadTestsFromTestCase(test_case)
+ res = unittest.TestResult()
+ suite(res)
+ return res
+
+ def testPluginTesterExecsPlugin(self):
+ called = []
+ class MockExecPlugin(StubPlugin):
+ def configure(self, options, conf):
+ called.append('configure')
+
+ class MockExecTestCase(SomePluginTestCase, unittest.TestCase):
+ activate = '--with-mockexec'
+ plugins = [MockExecPlugin()]
+
+ def test_something_anything(self):
+ # here is where the test case would test
+ # that the plugin interacted with stub tests
+ pass
+
+ res = self._runPluginTest(MockExecTestCase)
+ eq_(res.testsRun, 1)
+ eq_(called[0], 'configure')
+
+if __name__ == '__main__':
+ unittest.main() \ No newline at end of file
diff --git a/index.html.tpl b/index.html.tpl
index 16bf5db..2f3b48f 100644
--- a/index.html.tpl
+++ b/index.html.tpl
@@ -133,7 +133,7 @@
<h2>Hack</h2>
- <p><a href="http://code.google.com/p/python-nose/wiki/WritingPlugins">Write
+ <p><a href="doc/writing_plugins.html">Write
plugins!</a> It's easy and fun.</p>
<p>Get the code:
diff --git a/install-rpm.sh b/install-rpm.sh
new file mode 100755
index 0000000..68f7f01
--- /dev/null
+++ b/install-rpm.sh
@@ -0,0 +1,3 @@
+python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+# 'brp-compress' gzips the man pages without distutils knowing... fix this
+sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES
diff --git a/nose/__init__.py b/nose/__init__.py
index f1e2e90..a9c6a61 100644
--- a/nose/__init__.py
+++ b/nose/__init__.py
@@ -275,6 +275,11 @@ function test case wrapper for each tuple it yields. As in the example, test
generators must yield tuples, the first element of which must be a callable
and the remaining elements the arguments to be passed to the callable.
+By default, the test name output for a generated test in verbose mode
+will be the name of the generator function or method, followed by the
+args passed to the yielded callable. If you want to show a different test
+name, set the ``description`` attribute of the yielded callable.
+
Setup and teardown functions may be used with test generators. The setup and
teardown attributes must be attached to the generator function::
@@ -319,7 +324,7 @@ nose, by default, follows a few simple rules for test discovery.
loaded as package.module and the directory of *package* will be added to
sys.path.
-* If a object defines a __test__ attribute that does not evaluate to
+* If an object defines a __test__ attribute that does not evaluate to
True, that object will not be collected, nor will any objects it
contains.
@@ -392,11 +397,11 @@ from nose.exc import SkipTest, DeprecatedTest
from nose.tools import with_setup
__author__ = 'Jason Pellerin'
-__versioninfo__ = (0, 10, '0b1')
+__versioninfo__ = (0, 10, 0)
__version__ = '.'.join(map(str, __versioninfo__))
__all__ = [
- 'main', 'run', 'run_ext', 'runmodule', 'with_setup',
+ 'main', 'run', 'run_exit', 'runmodule', 'with_setup',
'SkipTest', 'DeprecatedTest', 'collector'
]
diff --git a/nose/case.py b/nose/case.py
index af19151..30b78fe 100644
--- a/nose/case.py
+++ b/nose/case.py
@@ -72,25 +72,34 @@ class Test(unittest.TestCase):
return "Test(%r)" % self.test
def afterTest(self, result):
+ """Called before test is run (before result.startTest)
+ """
try:
- result.afterTest(self.test)
+ afterTest = result.afterTest
except AttributeError:
pass
+ else:
+ afterTest(self.test)
def beforeTest(self, result):
+ """Called after test is complete (after result.stopTest)
+ """
try:
- result.beforeTest(self.test)
+ beforeTest = result.beforeTest
except AttributeError:
pass
+ else:
+ beforeTest(self.test)
def exc_info(self):
"""Extract exception info.
- """
-
+ """
exc, exv, tb = sys.exc_info()
return (exc, exv, tb)
def id(self):
+ """Get a short(er) description of the test
+ """
return self.test.id()
def address(self):
@@ -136,9 +145,9 @@ class Test(unittest.TestCase):
"""
if self.resultProxy:
result = self.resultProxy(result, self)
- self.beforeTest(result)
try:
try:
+ self.beforeTest(result)
self.runTest(result)
except KeyboardInterrupt:
raise
@@ -163,13 +172,29 @@ class Test(unittest.TestCase):
desc = self.plugins.describeTest(self)
if desc is not None:
return desc
- return self.test.shortDescription()
-
+ doc = self.test.shortDescription()
+ if doc is not None:
+ return doc
+ # work around bug in unittest.TestCase.shortDescription
+ # with multiline docstrings.
+ test = self.test
+ try:
+ doc = test._testMethodDoc # 2.5
+ except AttributeError:
+ try:
+ doc = test._TestCase__testMethodDoc # 2.4 and earlier
+ except AttributeError:
+ pass
+ if doc is not None:
+ doc = doc.strip().split("\n")[0].strip()
+ return doc
+
class TestBase(unittest.TestCase):
"""Common functionality for FunctionTestCase and MethodTestCase.
"""
__test__ = False # do not collect
+
def id(self):
return str(self)
@@ -183,7 +208,7 @@ class TestBase(unittest.TestCase):
doc = getattr(func, '__doc__', None)
if not doc:
doc = str(self)
- return doc.split("\n")[0].strip()
+ return doc.strip().split("\n")[0].strip()
class FunctionTestCase(TestBase):
@@ -193,6 +218,7 @@ class FunctionTestCase(TestBase):
create test cases for test functions.
"""
__test__ = False # do not collect
+
def __init__(self, test, setUp=None, tearDown=None, arg=tuple(),
descriptor=None):
"""Initialize the MethodTestCase.
@@ -219,7 +245,7 @@ class FunctionTestCase(TestBase):
self.tearDownFunc = tearDown
self.arg = arg
self.descriptor = descriptor
- unittest.TestCase.__init__(self)
+ TestBase.__init__(self)
def address(self):
"""Return a round-trip name for this test, a name that can be
@@ -290,6 +316,7 @@ class MethodTestCase(TestBase):
create test cases for test methods.
"""
__test__ = False # do not collect
+
def __init__(self, method, test=None, arg=tuple(), descriptor=None):
"""Initialize the MethodTestCase.
@@ -321,7 +348,7 @@ class MethodTestCase(TestBase):
if self.test is None:
method_name = self.method.__name__
self.test = getattr(self.inst, method_name)
- unittest.TestCase.__init__(self)
+ TestBase.__init__(self)
def __str__(self):
func, arg = self._descriptors()
diff --git a/nose/commands.py b/nose/commands.py
index 2fef2fd..80913e3 100644
--- a/nose/commands.py
+++ b/nose/commands.py
@@ -6,9 +6,8 @@ You can run tests using the `nosetests` setuptools command::
python setup.py nosetests
-This command has a few benefits over the standard `test` command: all nose
-plugins are supported, and you can configure the test run with both command
-line arguments and settings in your setup.cfg file.
+This command has one benefit over the standard `test` command: all nose
+plugins are supported.
To configure the `nosetests` command, add a [nosetests] section to your
setup.cfg. The [nosetests] section can contain any command line arguments that
@@ -43,69 +42,73 @@ dependencies or that build C extensions, using the setuptools command
can be more convenient than building by hand and running the nosetests
script.
"""
-from setuptools import Command
-from nose.config import Config, option_blacklist, user_config_files
-from nose.core import TestProgram
-from nose.plugins import DefaultPluginManager
-
-
-def get_user_options(parser):
- """convert a optparse option list into a distutils option tuple list"""
- opt_list = []
- for opt in parser.option_list:
- if opt._long_opts[0][2:] in option_blacklist:
- continue
- long_name = opt._long_opts[0][2:]
- if opt.action != 'store_true':
- long_name = long_name + "="
- short_name = None
- if opt._short_opts:
- short_name = opt._short_opts[0][1:]
- opt_list.append((long_name, short_name, opt.help or ""))
- return opt_list
-
-
-class nosetests(Command):
- description = "Run unit tests using nosetests"
- __config = Config(files=user_config_files(),
- plugins=DefaultPluginManager())
- __parser = __config.getParser()
- user_options = get_user_options(__parser)
-
-
- def initialize_options(self):
- """create the member variables, but change hyphens to underscores"""
- self.option_to_cmds = {}
- for opt in self.__parser.option_list:
- cmd_name = opt._long_opts[0][2:]
- option_name = cmd_name.replace('-', '_')
- self.option_to_cmds[option_name] = cmd_name
- setattr(self, option_name, None)
- self.attr = None
-
- def finalize_options(self):
- """nothing to do here"""
- pass
-
- def run(self):
- """ensure tests are capable of being run, then
- run nose.main with a reconstructed argument list"""
- self.run_command('egg_info')
-
- # Build extensions in-place
- self.reinitialize_command('build_ext', inplace=1)
- self.run_command('build_ext')
-
- if self.distribution.tests_require:
- self.distribution.fetch_build_eggs(self.distribution.tests_require)
-
- argv = []
- for (option_name, cmd_name) in self.option_to_cmds.items():
- if option_name in option_blacklist:
+try:
+ from setuptools import Command
+except ImportError:
+ Command = nosetests = None
+else:
+ from nose.config import Config, option_blacklist, user_config_files
+ from nose.core import TestProgram
+ from nose.plugins import DefaultPluginManager
+
+
+ def get_user_options(parser):
+ """convert a optparse option list into a distutils option tuple list"""
+ opt_list = []
+ for opt in parser.option_list:
+ if opt._long_opts[0][2:] in option_blacklist:
continue
- value = getattr(self, option_name)
- if value is not None:
- argv.extend(
- self.__config.cfgToArg(option_name, value,
- lambda o: o.replace('_', '-')))
- TestProgram(argv=argv, config=self.__config)
+ long_name = opt._long_opts[0][2:]
+ if opt.action != 'store_true':
+ long_name = long_name + "="
+ short_name = None
+ if opt._short_opts:
+ short_name = opt._short_opts[0][1:]
+ opt_list.append((long_name, short_name, opt.help or ""))
+ return opt_list
+
+
+ class nosetests(Command):
+ description = "Run unit tests using nosetests"
+ __config = Config(files=user_config_files(),
+ plugins=DefaultPluginManager())
+ __parser = __config.getParser()
+ user_options = get_user_options(__parser)
+
+ def initialize_options(self):
+ """create the member variables, but change hyphens to underscores"""
+ self.option_to_cmds = {}
+ for opt in self.__parser.option_list:
+ cmd_name = opt._long_opts[0][2:]
+ option_name = cmd_name.replace('-', '_')
+ self.option_to_cmds[option_name] = cmd_name
+ setattr(self, option_name, None)
+ self.attr = None
+
+ def finalize_options(self):
+ """nothing to do here"""
+ pass
+
+ def run(self):
+ """ensure tests are capable of being run, then
+ run nose.main with a reconstructed argument list"""
+ self.run_command('egg_info')
+
+ # Build extensions in-place
+ self.reinitialize_command('build_ext', inplace=1)
+ self.run_command('build_ext')
+
+ if self.distribution.tests_require:
+ self.distribution.fetch_build_eggs(
+ self.distribution.tests_require)
+
+ argv = []
+ for (option_name, cmd_name) in self.option_to_cmds.items():
+ if option_name in option_blacklist:
+ continue
+ value = getattr(self, option_name)
+ if value is not None:
+ argv.extend(
+ self.__config.cfgToArg(option_name, value,
+ lambda o: o.replace('_', '-')))
+ TestProgram(argv=argv, config=self.__config)
diff --git a/nose/config.py b/nose/config.py
index e287e0c..203f4d6 100644
--- a/nose/config.py
+++ b/nose/config.py
@@ -27,7 +27,7 @@ class Config(object):
behavior, including plugin lists. Here are the default values for
all config keys::
- self.env = env = kw.pop('env', os.environ)
+ 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)
@@ -45,7 +45,7 @@ class Config(object):
self.include = None
self.loggingConfig = None
self.logStream = sys.stderr
- self.options = ()
+ self.options = NoOptions()
self.parser = None
self.plugins = NoPlugins()
self.srcDirs = ('lib', 'src')
@@ -59,7 +59,7 @@ class Config(object):
"""
def __init__(self, **kw):
- self.env = env = kw.pop('env', os.environ)
+ self.env = env = kw.pop('env', {})
self.args = ()
self.testMatchPat = env.get('NOSE_TESTMATCH',
r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)
@@ -79,14 +79,14 @@ class Config(object):
self.include = None
self.loggingConfig = None
self.logStream = sys.stderr
- self.options = ()
+ 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.testNames = []
self.verbosity = int(env.get('NOSE_VERBOSE', 1))
self.where = ()
self.workingDir = os.getcwd()
@@ -122,12 +122,12 @@ class Config(object):
# load those config files to create a new argv set and reparse
if options.files:
argv = self.loadConfig(options.files, argv)
- options, args = parser.parse_args(argv)
- try:
- self.options, self.testNames = options, args[1:]
- except IndexError:
- self.options = options
+ options, args = parser.parse_args(argv)
+ self.options = options
+ tests = args[1:]
+ if tests:
+ self.testNames = tests
if options.testNames is not None:
self.testNames.extend(tolist(options.testNames))
@@ -427,6 +427,15 @@ class NoPlugins(object):
def __call__(self, *arg, **kw):
return
+class NoOptions(object):
+ """Options container that returns None for all options.
+ """
+ def __getattr__(self, attr):
+ return None
+
+ def __nonzero__(self):
+ return False
+
def user_config_files():
"""Return path to any existing user config files
diff --git a/nose/core.py b/nose/core.py
index 12d887c..76581ac 100644
--- a/nose/core.py
+++ b/nose/core.py
@@ -4,7 +4,6 @@ from __future__ import generators
import logging
import os
-import re
import sys
import time
import unittest
@@ -12,7 +11,8 @@ from warnings import warn
from nose.config import Config, all_config_files
from nose.loader import defaultTestLoader
-from nose.plugins.manager import DefaultPluginManager, RestrictedPluginManager
+from nose.plugins.manager import PluginManager, DefaultPluginManager, \
+ RestrictedPluginManager
from nose.result import TextTestResult
from nose.suite import FinalizingSuiteWrapper
from nose.util import isclass, tolist
@@ -132,10 +132,12 @@ class TestProgram(unittest.TestProgram):
Configuration
-------------
- 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 -- 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:
[nosetests]
verbosity=3
@@ -157,6 +159,10 @@ class TestProgram(unittest.TestProgram):
You can add -v or -vv to that command to show more information
about each plugin.
+ 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.
+
0.9 plugins
-----------
@@ -175,11 +181,36 @@ class TestProgram(unittest.TestProgram):
def __init__(self, module=None, defaultTest='.', argv=None,
testRunner=None, testLoader=None, env=None, config=None,
- suite=None, exit=True):
+ suite=None, exit=True, plugins=None):
+ """
+ Collect and run tests, returning success or failure.
+
+ The arguments to __init__ are the same as to `main()` and `run()`:
+
+ * module: All tests are in this module (default: None)
+ * defaultTest: Tests to load (default: '.')
+ * argv: Command line arguments (default: None; sys.argv is read)
+ * testRunner: Test runner instance (default: None)
+ * testLoader: Test loader instance (default: None)
+ * env: Environment; ignored if config is provided (default: None;
+ os.environ is read)
+ * config: `nose.config.Config`_ instance (default: None)
+ * suite: Suite or list of tests to run (default: None). Passing a
+ suite or lists of tests will bypass all test discovery and
+ loading. *ALSO NOTE* that if you pass a unittest.TestSuite
+ instance as the suite, context fixtures at the class, module and
+ package level will not be used, and many plugin hooks will not
+ be called. If you want normal nose behavior, either pass a list
+ of tests, or a fully-configured `nose.suite.ContextSuite`_.
+ * exit: Exit after running tests and printing report (default: True)
+ * plugins: List of plugins to use; ignored if config is provided
+ (default: load plugins with DefaultPluginManager)
+
+ """
if env is None:
env = os.environ
if config is None:
- config = self.makeConfig(env)
+ config = self.makeConfig(env, plugins)
self.config = config
self.suite = suite
self.exit = exit
@@ -187,19 +218,21 @@ class TestProgram(unittest.TestProgram):
self, module=module, defaultTest=defaultTest,
argv=argv, testRunner=testRunner, testLoader=testLoader)
- def makeConfig(self, env):
+ def makeConfig(self, env, plugins=None):
"""Load a Config, pre-filled with user config files if any are
found.
"""
- cfg_files = all_config_files()
+ cfg_files = all_config_files()
+ if plugins:
+ manager = PluginManager(plugins=plugins)
+ else:
+ manager = DefaultPluginManager()
return Config(
- env=env, files=cfg_files, plugins=DefaultPluginManager())
+ env=env, files=cfg_files, plugins=manager)
def parseArgs(self, argv):
"""Parse argv and env and configure running environment.
"""
- log.debug("parseArgs is called %s", argv)
-
self.config.configure(argv, doc=TestProgram.__doc__)
log.debug("configured %s", self.config)
@@ -236,11 +269,12 @@ class TestProgram(unittest.TestProgram):
self.createTests()
def createTests(self):
- """Create the tests to run. Default behavior is to discover
- tests using TestCollector using nose.loader.TestLoader as the
+ """Create the tests to run. If a self.suite
+ is set, then that suite will be used. Otherwise, tests will be
+ loaded from the given test names (self.testNames) using the
test loader.
"""
- log.debug("createTests called")
+ log.debug("createTests called with %s", self.suite)
if self.suite is not None:
# We were given an explicit suite to run. Make sure it's
# loaded and wrapped correctly.
@@ -313,10 +347,19 @@ def run(*arg, **kw):
* argv: Command line arguments (default: None; sys.argv is read)
* testRunner: Test runner instance (default: None)
* testLoader: Test loader instance (default: None)
- * env: Environment (default: None; os.environ is read)
- * config: nose.config.Config instance (default: None)
- * suite: Suite of tests to run (default: None)
-
+ * env: Environment; ignored if config is provided (default: None;
+ os.environ is read)
+ * config: `nose.config.Config`_ instance (default: None)
+ * suite: Suite or list of tests to run (default: None). Passing a
+ suite or lists of tests will bypass all test discovery and
+ loading. *ALSO NOTE* that if you pass a unittest.TestSuite
+ instance as the suite, context fixtures at the class, module and
+ package level will not be used, and many plugin hooks will not
+ be called. If you want normal nose behavior, either pass a list
+ of tests, or a fully-configured `nose.suite.ContextSuite`_.
+ * plugins: List of plugins to use; ignored if config is provided
+ (default: load plugins with DefaultPluginManager)
+
With the exception that the ``exit`` argument is always set
to False.
"""
diff --git a/nose/ext/dtcompat.py b/nose/ext/dtcompat.py
index cd7f563..97686d6 100644
--- a/nose/ext/dtcompat.py
+++ b/nose/ext/dtcompat.py
@@ -100,7 +100,7 @@ __all__ = [
import __future__
-import sys, traceback, inspect, linecache, os, re, types
+import sys, traceback, inspect, linecache, os, re
import unittest, difflib, pdb, tempfile
import warnings
from StringIO import StringIO
diff --git a/nose/importer.py b/nose/importer.py
index eebbf36..0a6d315 100644
--- a/nose/importer.py
+++ b/nose/importer.py
@@ -76,7 +76,7 @@ class Importer(object):
# from a new path
log.debug("sys.modules has %s as %s", part_fqname, old)
if self.sameModule(old, filename):
- mod = old
+ mod = old
else:
del sys.modules[part_fqname]
mod = load_module(part_fqname, fh, filename, desc)
diff --git a/nose/loader.py b/nose/loader.py
index 497f2cd..df60a91 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -19,13 +19,22 @@ from nose.importer import Importer, add_path, remove_path
from nose.selector import defaultSelector, TestAddress
from nose.util import cmp_lineno, getpackage, isclass, isgenerator, ispackage, \
match_last, resolve_name
-from suite import ContextSuiteFactory, ContextList, LazySuite
+from nose.suite import ContextSuiteFactory, ContextList, LazySuite
log = logging.getLogger(__name__)
#log.setLevel(logging.DEBUG)
+# for efficiency and easier mocking
+op_normpath = os.path.normpath
+op_abspath = os.path.abspath
+op_join = os.path.join
+op_isdir = os.path.isdir
+op_isfile = os.path.isfile
+
+
__all__ = ['TestLoader', 'defaultTestLoader']
+
class TestLoader(unittest.TestLoader):
"""Test loader that extends unittest.TestLoader to:
@@ -48,7 +57,7 @@ class TestLoader(unittest.TestLoader):
Parameters (all optional):
* config: provide a `nose.config.Config`_ or other config class
- instance; if not provided a `nose.config.Config` with
+ instance; if not provided a `nose.config.Config`_ with
default values is used.
* importer: provide an importer instance that implements
`importFromPath`. If not provided, a
@@ -56,25 +65,29 @@ class TestLoader(unittest.TestLoader):
* workingDir: the directory to which file and module names are
relative. If not provided, assumed to be the current working
directory.
- * selector: a selector class. If not provided, a
- `nose.selector.Selector`_ is used.
+ * selector: a selector class or instance. If a class is
+ provided, it will be instantiated with one argument, the
+ current config. If not provided, a `nose.selector.Selector`_
+ is used.
"""
if config is None:
config = Config()
if importer is None:
importer = Importer(config=config)
if workingDir is None:
- workingDir = config.workingDir
+ workingDir = config.workingDir
if selector is None:
selector = defaultSelector(config)
+ elif isclass(selector):
+ selector = selector(config)
self.config = config
self.importer = importer
- self.workingDir = os.path.normpath(os.path.abspath(workingDir))
+ self.workingDir = op_normpath(op_abspath(workingDir))
self.selector = selector
if config.addPaths:
add_path(workingDir, config)
self.suiteClass = ContextSuiteFactory(config=config)
- unittest.TestLoader.__init__(self)
+ unittest.TestLoader.__init__(self)
def getTestCaseNames(self, testCaseClass):
"""Override to select with selector, unless
@@ -117,36 +130,38 @@ class TestLoader(unittest.TestLoader):
for entry in entries:
if entry.startswith('.') or entry.startswith('_'):
continue
- entry_path = os.path.abspath(os.path.join(path, entry))
- is_file = os.path.isfile(entry_path)
- is_test = False
+ entry_path = op_abspath(op_join(path, entry))
+ is_file = op_isfile(entry_path)
+ wanted = False
if is_file:
is_dir = False
- is_test = self.selector.wantFile(entry_path)
+ wanted = self.selector.wantFile(entry_path)
else:
- is_dir = os.path.isdir(entry_path)
+ is_dir = op_isdir(entry_path)
if is_dir:
- is_test = self.selector.wantDirectory(entry_path)
+ wanted = self.selector.wantDirectory(entry_path)
is_package = ispackage(entry_path)
- if is_test and is_file:
- plugins.beforeContext()
- if entry.endswith('.py'):
- yield self.loadTestsFromName(
- entry_path, discovered=True)
- else:
- yield self.loadTestsFromFile(entry_path)
- plugins.afterContext()
- elif is_dir:
- if is_package:
+ if wanted:
+ if is_file:
+ plugins.beforeContext()
+ if entry.endswith('.py'):
+ yield self.loadTestsFromName(
+ entry_path, discovered=True)
+ else:
+ yield self.loadTestsFromFile(entry_path)
+ plugins.afterContext()
+ elif is_package:
# Load the entry as a package: given the full path,
# loadTestsFromName() will figure it out
yield self.loadTestsFromName(
entry_path, discovered=True)
- elif is_test:
+ else:
# Another test dir in this one: recurse lazily
yield self.suiteClass(
lambda: self.loadTestsFromDir(entry_path))
- # give plugins a chance
+ # Catch TypeError and AttributeError exceptions here and discard
+ # them: the default plugin manager, NoPlugins, will raise TypeError
+ # on generative calls.
try:
tests = []
for test in plugins.loadTestsFromDir(path):
@@ -280,7 +295,9 @@ class TestLoader(unittest.TestLoader):
for path in paths:
tests.extend(self.loadTestsFromDir(path))
- # give plugins a chance
+ # Catch TypeError and AttributeError exceptions here and discard
+ # them: the default plugin manager, NoPlugins, will raise TypeError
+ # on generative calls.
try:
for test in self.config.plugins.loadTestsFromModule(module):
tests.append(test)
@@ -367,7 +384,7 @@ class TestLoader(unittest.TestLoader):
(addr.call, path))])
return self.loadTestsFromName(addr.call, module=package)
else:
- if os.path.isdir(path):
+ if op_isdir(path):
# In this case we *can* be lazy since we know
# that each module in the dir will be fully
# loaded before its tests are executed; we
@@ -376,7 +393,7 @@ class TestLoader(unittest.TestLoader):
# of this named test load*
return LazySuite(
lambda: self.loadTestsFromDir(path))
- elif os.path.isfile(path):
+ elif op_isfile(path):
return self.loadTestsFromFile(path)
else:
return suite([
@@ -406,6 +423,9 @@ class TestLoader(unittest.TestLoader):
"""
cases = []
plugins = self.config.plugins
+ # Catch TypeError and AttributeError exceptions here and discard
+ # them: the default plugin manager, NoPlugins, will raise TypeError
+ # on generative calls.
try:
for case in plugins.loadTestsFromTestCase(testCaseClass):
cases.append(case)
@@ -440,7 +460,9 @@ class TestLoader(unittest.TestLoader):
return sel.wantMethod(item)
cases = [self.makeTest(getattr(cls, case), cls)
for case in filter(wanted, dir(cls))]
- # Give plugins a chance
+ # Catch TypeError and AttributeError exceptions here and discard
+ # them: the default plugin manager, NoPlugins, will raise TypeError
+ # on generative calls.
try:
for test in self.config.plugins.loadTestsFromTestClass(cls):
cases.append(test)
@@ -456,7 +478,9 @@ class TestLoader(unittest.TestLoader):
"""Given a test object and its parent, return a test case
or test suite.
"""
- # plugins get first crack
+ # Catch TypeError and AttributeError exceptions here and discard
+ # them: the default plugin manager, NoPlugins, will raise TypeError
+ # on generative calls.
plug_tests = []
try:
for test in self.config.plugins.makeTest(obj, parent):
diff --git a/nose/plugins/__init__.py b/nose/plugins/__init__.py
index 766f69e..91ea9a1 100644
--- a/nose/plugins/__init__.py
+++ b/nose/plugins/__init__.py
@@ -7,11 +7,11 @@ reporting. There are two basic rules for plugins:
* Plugin classes should subclass `nose.plugins.Plugin`_.
* Plugins may implement any of the methods described in the class
- PluginInterface in nose.plugins.base. Please note that this class is for
+ `PluginInterface`_ in nose.plugins.base. Please note that this class is for
documentary purposes only; plugins may not subclass PluginInterface.
.. _nose.plugins.Plugin: http://python-nose.googlecode.com/svn/trunk/nose/plugins/base.py
-
+
Registering
===========
@@ -171,8 +171,65 @@ Here's a simple example with a do-nothing plugin and a composed suite.
True
>>> res.testsRun
1
+
+And here is a more complex example of testing a plugin that has extra
+arguments and reads environment variables.
+
+ >>> import unittest, os
+ >>> from nose.plugins import Plugin, PluginTester
+ >>> class FancyOutputter(Plugin):
+ ... name = "fancy"
+ ... def configure(self, options, conf):
+ ... Plugin.configure(self, options, conf)
+ ... if not self.enabled:
+ ... return
+ ... self.fanciness = 1
+ ... if options.more_fancy:
+ ... self.fanciness = 2
+ ... if 'EVEN_FANCIER' in self.env:
+ ... self.fanciness = 3
+ ...
+ ... def options(self, parser, env=os.environ):
+ ... self.env = env
+ ... parser.add_option('--more-fancy', action='store_true')
+ ... Plugin.options(self, parser, env=env)
+ ...
+ ... def report(self, stream):
+ ... stream.write("FANCY " * self.fanciness)
+ ...
+ >>> class TestFancyOutputter(PluginTester, unittest.TestCase):
+ ... activate = '--with-fancy' # enables the plugin
+ ... plugins = [FancyOutputter()]
+ ... args = ['--more-fancy']
+ ... env = {'EVEN_FANCIER': '1'}
+ ...
+ ... def test_fancy_output(self):
+ ... assert "FANCY FANCY FANCY" in self.output, (
+ ... "got: %s" % self.output)
+ ... def makeSuite(self):
+ ... class TC(unittest.TestCase):
+ ... def runTest(self):
+ ... raise ValueError("I hate fancy stuff")
+ ... return unittest.TestSuite([TC()])
+ ...
+ >>> res = unittest.TestResult()
+ >>> case = TestFancyOutputter('test_fancy_output')
+ >>> case(res)
+ >>> res.errors
+ []
+ >>> res.failures
+ []
+ >>> res.wasSuccessful()
+ True
+ >>> res.testsRun
+ 1
+
"""
from nose.plugins.base import Plugin
from nose.plugins.manager import *
from nose.plugins.plugintest import PluginTester
+if __name__ == '__main__':
+ import doctest
+ doctest.testmod()
+
diff --git a/nose/plugins/attrib.py b/nose/plugins/attrib.py
index c425bc8..2f0a1a4 100644
--- a/nose/plugins/attrib.py
+++ b/nose/plugins/attrib.py
@@ -31,7 +31,6 @@ Eval expression syntax (-A, --eval-attr) examples:
"""
import logging
import os
-import re
import sys
from inspect import isfunction
from nose.plugins.base import Plugin
diff --git a/nose/plugins/base.py b/nose/plugins/base.py
index 87bd16b..6bea261 100644
--- a/nose/plugins/base.py
+++ b/nose/plugins/base.py
@@ -7,8 +7,9 @@ from nose.util import tolist
class Plugin(object):
"""Base class for nose plugins. It's not *necessary* to subclass this
class to create a plugin; however, all plugins must implement
- `options(self, parser, env)` and `configure(self, options,
- conf)`, and must have the attributes `enabled`, `name` and `score`.
+ `options(self, parser, env)` and `configure(self, options, conf)`, and
+ must have the attributes `enabled`, `name` and `score`. The `name`
+ attribute may contain hyphens ('-').
Plugins should not be enabled by default.
@@ -16,8 +17,9 @@ class Plugin(object):
__init__, configure, and options, if you override them) will give
your plugin some friendly default behavior:
- * A --with-$name option will be added to the command line
- interface to enable the plugin. The plugin class's docstring
+ * A --with-$name option will be added to the command line interface
+ to enable the plugin, and a corresponding environment variable
+ will be used as the default value. The plugin class's docstring
will be used as the help for this option.
* The plugin will not be enabled unless this option is selected by
the user.
@@ -32,7 +34,7 @@ class Plugin(object):
if self.name is None:
self.name = self.__class__.__name__.lower()
if self.enableOpt is None:
- self.enableOpt = "enable_plugin_%s" % self.name
+ self.enableOpt = "enable_plugin_%s" % self.name.replace('-', '_')
def addOptions(self, parser, env=os.environ):
"""Add command-line options for this plugin.
@@ -61,7 +63,7 @@ class Plugin(object):
options behavior with protection from OptionConflictErrors.
"""
env_opt = 'NOSE_WITH_%s' % self.name.upper()
- env_opt.replace('-', '_')
+ env_opt = env_opt.replace('-', '_')
parser.add_option("--with-%s" % self.name,
action="store_true",
dest=self.enableOpt,
@@ -92,7 +94,6 @@ class Plugin(object):
# Compatiblity shim
def tolist(self, val):
- from warnings import warn
warn("Plugin.tolist is deprecated. Use nose.util.tolist instead",
DeprecationWarning)
return tolist(val)
@@ -725,7 +726,7 @@ class IPluginInterface(object):
def prepareTestRunner(self, runner):
"""Called before tests are run. To replace the test runner,
return a test runner. To allow other plugins to process the
- test runner, return None. Only valid when using nose.TesrProgram.
+ test runner, return None. Only valid when using nose.TestProgram.
:Parameters:
runner : `nose.core.TextTestRunner` or other runner instance
@@ -870,14 +871,14 @@ class IPluginInterface(object):
:Parameters:
module : python module
- The module object being examined by the selecto
+ The module object being examined by the selector
"""
pass
def wantModuleTests(self, module):
"""
.. Note:: DEPRECATED -- this method will not be called, it has
- been folded in to wantModule.
+ been folded into wantModule.
"""
pass
wantModuleTests.deprecated = True
diff --git a/nose/plugins/doctests.py b/nose/plugins/doctests.py
index acecf83..f15fd78 100644
--- a/nose/plugins/doctests.py
+++ b/nose/plugins/doctests.py
@@ -12,6 +12,9 @@ doctest tests are run like any other test, with the exception that output
capture does not work, because doctest does its own output capture in the
course of running a test.
+This module also includes a specialized version of nose.run() that
+makes it easier to write doctests that test test runs.
+
.. _doctest: http://docs.python.org/lib/module-doctest.html
"""
from __future__ import generators
@@ -21,6 +24,10 @@ import os
from inspect import getmodule
from nose.plugins.base import Plugin
from nose.util import anyp, getpackage, test_address, resolve_name, tolist
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
log = logging.getLogger(__name__)
@@ -32,6 +39,7 @@ except (ImportError, AttributeError):
# system version is too old
import nose.ext.dtcompat as doctest
+
#
# Doctest and coverage don't get along, so we need to create
# a monkeypatch that will replace the part of doctest that
@@ -70,8 +78,10 @@ class Doctest(Plugin):
parser.add_option('--doctest-tests', action='store_true',
dest='doctest_tests',
default=env.get('NOSE_DOCTEST_TESTS'),
- help="Also look for doctests in test modules "
- "[NOSE_DOCTEST_TESTS]")
+ help="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]")
parser.add_option('--doctest-extension', action="append",
dest="doctestExtension",
help="Also look for doctests in files with "
@@ -121,7 +131,8 @@ class Doctest(Plugin):
dh.close()
parser = doctest.DocTestParser()
test = parser.get_doctest(
- doc, globs={}, name=name, filename=filename, lineno=0)
+ doc, globs={'__file__': filename}, name=name,
+ filename=filename, lineno=0)
if test.examples:
yield DocFileCase(test)
else:
@@ -217,3 +228,14 @@ class DocFileCase(doctest.DocFileCase):
"""
def address(self):
return (self._dt_test.filename, None, None)
+
+
+def run(*arg, **kw):
+ """DEPRECATED: moved to nose.plugins.plugintest.
+ """
+ import warnings
+ warnings.warn("run() has been moved to nose.plugins.plugintest. Please "
+ "update your imports.", category=DeprecationWarning,
+ stacklevel=2)
+ from nose.plugins.plugintest import run
+ run(*arg, **kw)
diff --git a/nose/plugins/errorclass.py b/nose/plugins/errorclass.py
index 6306574..3fe3fc9 100644
--- a/nose/plugins/errorclass.py
+++ b/nose/plugins/errorclass.py
@@ -89,7 +89,7 @@ Since we defined a Todo as a failure, the run was not successful.
from new import instancemethod
from nose.plugins.base import Plugin
from nose.result import TextTestResult
-
+from nose.util import isclass
class MetaErrorClass(type):
"""Metaclass for ErrorClassPlugins that allows error classes to be
@@ -128,6 +128,8 @@ class ErrorClassPlugin(Plugin):
def addError(self, test, err):
err_cls, a, b = err
+ if not isclass(err_cls):
+ return
classes = [e[0] for e in self.errorClasses]
if filter(lambda c: issubclass(err_cls, c), classes):
return True
diff --git a/nose/plugins/manager.py b/nose/plugins/manager.py
index 3e8a949..6b72b8c 100644
--- a/nose/plugins/manager.py
+++ b/nose/plugins/manager.py
@@ -46,7 +46,9 @@ other than ``PluginManager``.
"""
import logging
import os
+import sys
from warnings import warn
+from nose.case import Failure
from nose.plugins.base import IPluginInterface
__all__ = ['DefaultPluginManager', 'PluginManager', 'EntryPointPluginManager',
@@ -123,10 +125,18 @@ class PluginProxy(object):
"""Call all plugins, yielding each item in each non-None result.
"""
for p, meth in self.plugins:
- result = meth(*arg, **kw)
- if result is not None:
- for r in result:
- yield r
+ result = None
+ try:
+ result = meth(*arg, **kw)
+ except (KeyboardInterrupt, SystemExit):
+ raise
+ except:
+ exc = sys.exc_info()
+ yield Failure(*exc)
+ else:
+ if result is not None:
+ for r in result:
+ yield r
def simple(self, *arg, **kw):
"""Call all plugins, returning the first non-None result.
diff --git a/nose/plugins/plugintest.py b/nose/plugins/plugintest.py
index 09b00aa..7ead48e 100644
--- a/nose/plugins/plugintest.py
+++ b/nose/plugins/plugintest.py
@@ -2,26 +2,26 @@
Plugin tester
-------------
-FIXME docs
+Utilities for testing plugins.
-utilities for testing plugins
"""
-import os
+import re
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
-__all__ = ['PluginTester']
+__all__ = ['PluginTester', 'run']
+
class PluginTester(object):
"""A mixin for testing nose plugins in their runtime environment.
Subclass this and mix in unittest.TestCase to run integration/functional
- tests on your plugin. After setUp() the class contains an attribute,
- self.nose, which is an instance of NoseStream. See NoseStream docs for
- more details
+ tests on your plugin. When setUp() is called, the stub test suite is
+ executed with your plugin so that during an actual test you can inspect the
+ artifacts of how your plugin interacted with the stub test suite.
Class Variables
---------------
@@ -59,14 +59,27 @@ class PluginTester(object):
plugins = []
def makeSuite(self):
- """Must override to return a suite of tests to run if you
- don't supply a suitepath. May return None.
+ """returns a suite object of tests to run (unittest.TestSuite())
+
+ If self.suitepath is None, this must be implemented. The returned suite
+ object will be executed with all plugins activated. It may return
+ None.
+
+ Here is an example of a basic suite object you can return ::
+
+ >>> import unittest
+ >>> class SomeTest(unittest.TestCase):
+ ... def runTest(self):
+ ... raise ValueError("Now do something, plugin!")
+ ...
+ >>> unittest.TestSuite([SomeTest()]) # doctest: +ELLIPSIS
+ <unittest.TestSuite tests=[<...SomeTest testMethod=runTest>]>
+
"""
raise NotImplementedError
def _execPlugin(self):
- """Create a TestProgram run with the given plugins, for
- the suite returned by makeSuite or found at suitePath
+ """execute the plugin on the internal test suite.
"""
from nose.config import Config
from nose.core import TestProgram
@@ -74,20 +87,20 @@ class PluginTester(object):
suite = None
stream = StringIO()
- conf = Config(stream=stream,
+ conf = Config(env=self.env,
+ stream=stream,
plugins=PluginManager(plugins=self.plugins))
if not self.suitepath:
suite = self.makeSuite()
- self.nose = TestProgram(argv=self.argv, env=self.env,
- config=conf, suite=suite, exit=False)
+ self.nose = TestProgram(argv=self.argv, config=conf, suite=suite,
+ exit=False)
self.output = AccessDecorator(stream)
def setUp(self):
- """runs nosetests within a directory named self.suitepath
+ """runs nosetests with the specified test suite, all plugins
+ activated.
"""
- if not self.env:
- self.env = dict([(k,v) for k,v in os.environ.items()])
self.argv = ['nosetests', self.activate]
if self.args:
self.argv.extend(self.args)
@@ -111,3 +124,80 @@ class AccessDecorator(object):
return self.stream
def __str__(self):
return self._buf
+
+
+def blankline_separated_blocks(text):
+ block = []
+ for line in text.splitlines(True):
+ block.append(line)
+ if not line.strip():
+ yield "".join(block)
+ block = []
+ if block:
+ yield "".join(block)
+
+
+def remove_stack_traces(out):
+ # this regexp taken from Python 2.5's doctest
+ traceback_re = re.compile(r"""
+ # Grab the traceback header. Different versions of Python have
+ # said different things on the first traceback line.
+ ^(?P<hdr> Traceback\ \(
+ (?: most\ recent\ call\ last
+ | innermost\ last
+ ) \) :
+ )
+ \s* $ # toss trailing whitespace on the header.
+ (?P<stack> .*?) # don't blink: absorb stuff until...
+ ^ (?P<msg> \w+ .*) # a line *starts* with alphanum.
+ """, re.VERBOSE | re.MULTILINE | re.DOTALL)
+ blocks = []
+ for block in blankline_separated_blocks(out):
+ blocks.append(traceback_re.sub(r"\g<hdr>\n...\n\g<msg>", block))
+ return "".join(blocks)
+
+
+def munge_nose_output_for_doctest(out):
+ """Modify nose output to make it easy to use in doctests."""
+ out = remove_stack_traces(out)
+ return re.sub(
+ r"Ran (\d+ tests?) in [0-9.]+s", r"Ran \1 in ...s", out).strip()
+
+
+def run(*arg, **kw):
+ """
+ Specialized version of nose.run for use inside of doctests that
+ test test runs.
+
+ This version of run() prints the result output to stdout. Before
+ printing, the output is processed by replacing the timing
+ information with an ellipsis (...), removing traceback stacks, and
+ removing trailing whitespace.
+
+ Use this version of run wherever you are writing a doctest that
+ tests nose (or unittest) test result output.
+
+ Note: do not use doctest: +ELLIPSIS when testing nose output,
+ since ellipses ("test_foo ... ok") in your expected test runner
+ output may match multiple lines of output, causing spurious test
+ passes!
+ """
+ from nose import run
+ from nose.config import Config
+ from nose.plugins.manager import PluginManager
+
+ buffer = StringIO()
+ if 'config' not in kw:
+ plugins = kw.pop('plugins', None)
+ env = kw.pop('env', {})
+ kw['config'] = Config(env=env, plugins=PluginManager(plugins=plugins))
+ kw['config'].stream = buffer
+ run(*arg, **kw)
+ out = buffer.getvalue()
+ print munge_nose_output_for_doctest(out)
+
+
+
+if __name__ == '__main__':
+ import doctest
+ doctest.testmod()
diff --git a/nose/plugins/prof.py b/nose/plugins/prof.py
index 0d07260..f255e87 100644
--- a/nose/plugins/prof.py
+++ b/nose/plugins/prof.py
@@ -25,15 +25,15 @@ class Profile(Plugin):
clean_stats_file = False
def options(self, parser, env=os.environ):
Plugin.options(self, parser, env)
- parser.add_option('--profile-sort',action='store',dest='profile_sort',
- default=env.get('NOSE_PROFILE_SORT','cumulative'),
+ parser.add_option('--profile-sort', action='store', dest='profile_sort',
+ default=env.get('NOSE_PROFILE_SORT', 'cumulative'),
help="Set sort order for profiler output")
- parser.add_option('--profile-stats-file',action='store',
+ parser.add_option('--profile-stats-file', action='store',
dest='profile_stats_file',
default=env.get('NOSE_PROFILE_STATS_FILE'),
help='Profiler stats file; default is a new '
'temp file on each run')
- parser.add_option('--profile-restrict',action='append',
+ parser.add_option('--profile-restrict', action='append',
dest='profile_restrict',
default=env.get('NOSE_PROFILE_RESTRICT'),
help="Restrict profiler output. See help for "
@@ -82,6 +82,10 @@ class Profile(Plugin):
sys.stdout = tmp
def finalize(self, result):
+ try:
+ self.prof.close()
+ except AttributeError:
+ pass
if self.clean_stats_file:
if self.fileno:
try:
diff --git a/nose/plugins/testid.py b/nose/plugins/testid.py
index d578d71..a26a752 100644
--- a/nose/plugins/testid.py
+++ b/nose/plugins/testid.py
@@ -59,13 +59,16 @@ class TestId(Plugin):
def options(self, parser, env):
Plugin.options(self, parser, env)
parser.add_option('--id-file', action='store', dest='testIdFile',
- default='~/.noseids',
+ default='.noseids',
help="Store test ids found in test runs in this "
- "file.")
+ "file. Default is the file .noseids in the "
+ "working directory.")
def configure(self, options, conf):
Plugin.configure(self, options, conf)
self.idfile = os.path.expanduser(options.testIdFile)
+ if not os.path.isabs(self.idfile):
+ self.idfile = os.path.join(conf.workingDir, self.idfile)
self.id = 1
# Ids and tests are mirror images: ids are {id: test address} and
# tests are {test address: id}
diff --git a/nose/proxy.py b/nose/proxy.py
index 3387bb8..b163cd5 100644
--- a/nose/proxy.py
+++ b/nose/proxy.py
@@ -138,6 +138,7 @@ class ResultProxy(object):
self.result.stop()
def stopTest(self, test):
+ self.assertMyTest(test)
self.plugins.stopTest(self.test)
self.result.stopTest(self.test)
diff --git a/nose/selector.py b/nose/selector.py
index 7aa6597..a794288 100644
--- a/nose/selector.py
+++ b/nose/selector.py
@@ -17,6 +17,15 @@ log = logging.getLogger(__name__)
__all__ = ['Selector', 'defaultSelector', 'TestAddress']
+# for efficiency and easier mocking
+op_join = os.path.join
+op_basename = os.path.basename
+op_exists = os.path.exists
+op_splitext = os.path.splitext
+op_isabs = os.path.isabs
+op_abspath = os.path.abspath
+
+
class Selector(object):
"""Core test selector. Examines test candidates and determines whether,
given the specified configuration, the test candidate should be selected
@@ -77,9 +86,9 @@ class Selector(object):
All package directories match, so long as they do not match exclude.
All other directories must match test requirements.
"""
- init = os.path.join(dirname, '__init__.py')
- tail = os.path.basename(dirname)
- if os.path.exists(init):
+ init = op_join(dirname, '__init__.py')
+ tail = op_basename(dirname)
+ if op_exists(init):
wanted = (not self.exclude
or not filter(None,
[exc.search(tail) for exc in self.exclude]
@@ -105,7 +114,7 @@ class Selector(object):
"""
# never, ever load files that match anything in ignore
# (.* _* and *setup*.py by default)
- base = os.path.basename(file)
+ base = op_basename(file)
ignore_matches = [ ignore_this for ignore_this in self.ignoreFiles
if ignore_this.search(base) ]
if ignore_matches:
@@ -115,7 +124,7 @@ class Selector(object):
if not self.config.includeExe and os.access(file, os.X_OK):
log.info('%s is executable; skipped', file)
return False
- dummy, ext = os.path.splitext(base)
+ dummy, ext = op_splitext(base)
pysrc = ext == '.py'
wanted = pysrc and self.matches(base)
@@ -185,6 +194,7 @@ class Selector(object):
plug_wants = self.plugins.wantModule(module)
if plug_wants is not None:
wanted = plug_wants
+ log.debug("wantModule %s? %s", module, wanted)
return wanted
defaultSelector = Selector
@@ -222,9 +232,9 @@ class TestAddress(object):
self.filename = getfilename(self.module, self.workingDir)
if self.filename:
self.filename = src(self.filename)
- if not os.path.isabs(self.filename):
- self.filename = os.path.abspath(os.path.join(workingDir,
- self.filename))
+ if not op_isabs(self.filename):
+ self.filename = op_abspath(op_join(workingDir,
+ self.filename))
if self.module is None:
self.module = getpackage(self.filename)
log.debug(
diff --git a/nose/suite.py b/nose/suite.py
index 46b785b..d7d36b6 100644
--- a/nose/suite.py
+++ b/nose/suite.py
@@ -13,11 +13,10 @@ from __future__ import generators
import logging
import sys
import unittest
-from inspect import isclass
from nose.case import Test
from nose.config import Config
from nose.proxy import ResultProxyFactory
-from nose.util import resolve_name, try_run
+from nose.util import isclass, resolve_name, try_run
log = logging.getLogger(__name__)
#log.setLevel(logging.DEBUG)
@@ -141,7 +140,6 @@ class ContextSuite(LazySuite):
"""Run tests in suite inside of suite fixtures.
"""
# proxy the result for myself
- config = self.config
if self.resultProxy:
result, orig = self.resultProxy(result, self), result
else:
@@ -324,12 +322,12 @@ class ContextSuiteFactory(object):
"""
log.debug("Create suite for %s", tests)
context = getattr(tests, 'context', None)
+ log.debug("tests %s context %s", tests, context)
if context is None:
tests = self.wrapTests(tests)
try:
context = self.findContext(tests)
except MixedContextError:
- self.count = 0
return self.makeSuite(self.mixedSuites(tests), None)
return self.makeSuite(tests, context)
@@ -411,7 +409,6 @@ class ContextSuiteFactory(object):
context = getattr(head, 'context', None)
if context is not None:
ancestors = [context] + [a for a in self.ancestry(context)]
- count = 0
for ancestor in ancestors:
common = [suite] # tests with ancestor in common, so far
remain = [] # tests that remain to be processed
@@ -437,10 +434,13 @@ class ContextSuiteFactory(object):
return [suite] + self.mixedSuites(tail)
def wrapTests(self, tests):
+ log.debug("wrap %s", tests)
if callable(tests) or isinstance(tests, unittest.TestSuite):
+ log.debug("I won't wrap")
return tests
wrapped = []
for test in tests:
+ log.debug("wrapping %s", test)
if isinstance(test, Test) or isinstance(test, unittest.TestSuite):
wrapped.append(test)
else:
diff --git a/nose/util.py b/nose/util.py
index 9d224b5..440f52a 100644
--- a/nose/util.py
+++ b/nose/util.py
@@ -248,7 +248,7 @@ def resolve_name(name, module=None):
obj = module
log.debug("resolve: %s, %s, %s, %s", parts, name, obj, module)
for part in parts:
- parent, obj = obj, getattr(obj, part)
+ obj = getattr(obj, part)
return obj
@@ -307,14 +307,20 @@ def test_address(test):
# type-based polymorphism sucks in general, but I believe is
# appropriate here
t = type(test)
+ file = module = call = None
if t == types.ModuleType:
- return (os.path.abspath(test.__file__), test.__name__, None)
- if t == types.FunctionType:
- m = sys.modules[test.__module__]
- return (os.path.abspath(m.__file__), test.__module__, test.__name__)
- if t in (type, types.ClassType):
- m = sys.modules[test.__module__]
- return (os.path.abspath(m.__file__), test.__module__, test.__name__)
+ file = getattr(test, '__file__', None)
+ module = getattr(test, '__name__', None)
+ return (file, module, call)
+ if t == types.FunctionType or t in (type, types.ClassType):
+ module = getattr(test, '__module__', None)
+ if module is not None:
+ m = sys.modules[module]
+ file = getattr(m, '__file__', None)
+ if file is not None:
+ file = os.path.abspath(file)
+ call = getattr(test, '__name__', None)
+ return (file, module, call)
if t == types.InstanceType:
return test_address(test.__class__)
if t == types.MethodType:
diff --git a/scripts/mkdocs.py b/scripts/mkdocs.py
index 66da2a7..b027c46 100755
--- a/scripts/mkdocs.py
+++ b/scripts/mkdocs.py
@@ -5,22 +5,33 @@ import re
import time
from docutils.core import publish_string, publish_parts
from docutils.readers.standalone import Reader
+from docutils.writers.html4css1 import Writer, HTMLTranslator
from pudge.browser import Browser
-from epydoc.objdoc import _lookup_class_field
import inspect
import nose
import textwrap
from optparse import OptionParser
from nose.util import resolve_name, odict
from pygments import highlight
-from pygments.lexers import PythonLexer
+from pygments.lexers import PythonLexer, PythonConsoleLexer
from pygments.formatters import HtmlFormatter
remove_at = re.compile(r' at 0x[0-9a-f]+')
+root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+doc = os.path.join(root, 'doc')
+tpl = open(os.path.join(doc, 'doc.html.tpl'), 'r').read()
+api_tpl = open(os.path.join(doc, 'plugin_api.html.tpl'), 'r').read()
+plug_tpl = open(os.path.join(doc, 'plugin.html.tpl'), 'r').read()
+std_info = {
+ 'version': nose.__version__,
+ 'date': time.ctime()
+ }
+to_write = []
def defining_class(cls, attr):
+ from epydoc.objdoc import _lookup_class_field
val, container = _lookup_class_field(cls, attr)
return container.value()
@@ -41,12 +52,9 @@ def doc_word(node):
# handle links like package.module and module.Class
# as wellas 'foo bar'
- name = node.astext()
- print "Unknown ref %s" % name
+ orig = name = node.astext()
if '.' in name:
-
parts = name.split('.')
-
# if the first letter of a part is capitalized, assume it's
# a class name, and put all parts from that part on into
# the anchor part of the link
@@ -54,10 +62,15 @@ def doc_word(node):
addto = link
while parts:
part = parts.pop(0)
- if addto == link and part[0].upper() == part[0]:
- addto = anchor
+ if addto == link:
+ if part[0].upper() == part[0]:
+ addto = anchor
+ elif part.endswith('()'):
+ addto = anchor
+ part = part[:-2]
addto.append(part)
- if name.startswith('nose.plugins'):
+ if (name.startswith('nose.plugins')
+ and 'plugintest' not in name):
base = 'plugin_'
link = link[-1:]
else:
@@ -66,9 +79,12 @@ def doc_word(node):
if anchor:
node['refuri'] += '#' + '.'.join(anchor)
else:
- node['refuri'] = '_'.join(
- map(lambda s: s.lower(), name.split(' '))) + '.html'
+ # pad out wiki-words
+ name = name[0].lower() + name[1:]
+ name = re.sub(r'([A-Z])', r' \1', name).lower()
+ node['refuri'] = '_'.join(name.split(' ')) + '.html'
+ print "Unknown ref %s -> %s" % (orig, node['refuri'])
del node['refname']
node.resolved = True
return True
@@ -80,6 +96,26 @@ class DocReader(Reader):
unknown_reference_resolvers = (doc_word,)
+class PygHTMLTranslator(HTMLTranslator):
+ """HTML translator that uses pygments to highlight doctests.
+ """
+ def visit_doctest_block(self, node):
+ self.body.append(
+ highlight(node.rawsource, PythonConsoleLexer(), HtmlFormatter()))
+ # hacky way of capturing children -- we've processed the whole node
+ self._body = self.body
+ self.body = []
+
+ def depart_doctest_block(self, node):
+ # restore the real body, doctest node is done
+ self.body = self._body
+ del self._body
+
+class PygWriter(Writer):
+ def __init__(self):
+ Writer.__init__(self)
+ self.translator_class = PygHTMLTranslator
+
def formatargspec(func, exclude=()):
try:
args, varargs, varkw, defaults = inspect.getargspec(func)
@@ -105,9 +141,12 @@ def clean_default(val):
return val
+def to_html_parts(rst):
+ return publish_parts(rst, reader=DocReader(), writer=PygWriter())
+
+
def to_html(rst):
- parts = publish_parts(rst, reader=DocReader(), writer_name='html')
- return parts['body']
+ return to_html_parts(rst)['body']
def document_module(mod):
@@ -297,6 +336,7 @@ def format_attr(obj, attr):
val = remove_at.sub('', val)
return val
+
def link_to_class(cls):
mod = cls.__module__
name = cls.__name__
@@ -309,180 +349,200 @@ def link_to_class(cls):
return '<a href="module_%s.html#%s">%s</a>' % (mod, name, name)
-root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
-doc = os.path.join(root, 'doc')
-tpl = open(os.path.join(doc, 'doc.html.tpl'), 'r').read()
-api_tpl = open(os.path.join(doc, 'plugin_api.html.tpl'), 'r').read()
-plug_tpl = open(os.path.join(doc, 'plugin.html.tpl'), 'r').read()
-std_info = {
- 'version': nose.__version__,
- 'date': time.ctime()
- }
-to_write = []
+def plugin_example_tests():
+ dt_root = os.path.join(root, 'functional_tests', 'doc_tests')
+ for dirpath, dirnames, filenames in os.walk(dt_root):
+ for filename in filenames:
+ if filename.startswith('.'):
+ continue
+ base, ext = os.path.splitext(filename)
+ if ext == '.rst':
+ yield os.path.join(dirpath, filename)
+ if '.svn' in dirnames:
+ dirnames.remove('.svn')
+
+
+def document_rst_test(filename, section):
+ base, ext = os.path.splitext(os.path.basename(filename))
+ rst = open(filename, 'r').read()
+ parts = to_html_parts(rst)
+ parts.update(std_info)
+ to_write.append((section,
+ parts['title'],
+ os.path.join(doc, base + '.html'),
+ tpl,
+ parts))
+
+def main():
+ # plugins
+ from nose import plugins
+ from nose.plugins.base import IPluginInterface
+ from nose.plugins import errorclass
+
+ # writing plugins guide
+ writing_plugins = {'body': to_html(plugins.__doc__)}
+ writing_plugins.update(std_info)
+ writing_plugins['title'] = 'Writing Plugins'
+ to_write.append(
+ ('Plugins',
+ 'Writing Plugins',
+ os.path.join(doc, 'writing_plugins.html'), tpl, writing_plugins))
-# plugins
-from nose import plugins
-from nose.plugins.base import IPluginInterface
-from nose.plugins import errorclass
-
-# writing plugins guide
-writing_plugins = {'body': to_html(plugins.__doc__)}
-writing_plugins.update(std_info)
-writing_plugins['title'] = 'Writing Plugins'
-to_write.append(
- ('Plugins',
- 'Writing Plugins',
- os.path.join(doc, 'writing_plugins.html'), tpl, writing_plugins))
-
-
-# error class plugins
-ecp = {'body': to_html(errorclass.__doc__)}
-ecp.update(std_info)
-ecp['title'] = 'ErrorClass Plugins'
-to_write.append(
- ('Plugins',
- 'ErrorClass Plugins',
- os.path.join(doc, 'errorclassplugin.html'), tpl, ecp))
-
-# interface
-itf = {'body': to_html(textwrap.dedent(IPluginInterface.__doc__))}
-
-# methods
-attr = [(a, getattr(IPluginInterface, a)) for a in dir(IPluginInterface)]
-methods = [m for m in attr if inspect.ismethod(m[1])]
-methods.sort()
-# print "Documenting methods", [a[0] for a in methods]
-
-method_html = []
-method_tpl = """
-<div class="method %(extra_class)s">
-<a name="%(name)s">
-<span class="name">%(name)s</span><span class="arg">%(arg)s</span></a>
-<div class="doc">%(body)s</div>
-</div>
-"""
-
-menu_links = {}
-
-m_attrs = ('_new', 'changed', 'deprecated', 'generative', 'chainable')
-for m in methods:
- name, meth = m
- ec = []
- for att in m_attrs:
- if hasattr(meth, att):
- ec.append(att.replace('_', ''))
- menu_links.setdefault(att.replace('_', ''), []).append(name)
- # padding evens the lines
- print name
- mdoc = {'body': to_html(textwrap.dedent(' ' + meth.__doc__))}
- argspec = formatargspec(meth)
- mdoc.update({'name': name,
- 'extra_class': ' '.join(ec),
- 'arg': argspec})
- method_html.append(method_tpl % mdoc)
-
-itf['methods'] = ''.join(method_html)
-itf.update(std_info)
-itf['title'] = 'Plugin Interface'
-
-menu = []
-for section in ('new', 'changed', 'deprecated'):
- menu.append('<h2>%s methods</h2>' % section.title())
- menu.append('<ul><li>')
- menu.append('</li><li>'.join([
- '<a href="#%(name)s">%(name)s</a>' % {'name': n}
- for n in menu_links[section]]))
- menu.append('</li></ul>')
-itf['sub_menu'] = ''.join(menu)
-
-to_write.append(
- ('Plugins',
- 'Plugin Interface',
- os.path.join(doc, 'plugin_interface.html'), api_tpl, itf))
-
-
-# individual plugin usage docs
-from nose.plugins.builtin import builtins
-
-pmeths = [m[0] for m in methods[:]
- if not 'options' in m[0].lower()]
-pmeths.append('options')
-pmeths.sort()
-
-for modulename, clsname in builtins:
- _, _, modname = modulename.split('.')
- mod = resolve_name(modulename)
- cls = getattr(mod, clsname)
- filename = os.path.join(doc, 'plugin_%s.html' % modname)
- print modname, filename
- if not mod.__doc__:
- print "No docs"
- continue
- pdoc = {'body': to_html(mod.__doc__)}
- pdoc.update(std_info)
- pdoc['title'] = 'builtin plugin: %s' % modname
-
- # options
- parser = OptionParser(add_help_option=False)
- plug = cls()
- plug.addOptions(parser)
- options = parser.format_option_help()
- pdoc['options'] = options
-
- # hooks used
- hooks = []
- for m in pmeths:
- if getattr(cls, m, None):
- hooks.append('<li><a href="plugin_interface.html#%(name)s">'
- '%(name)s</a></li>' % {'name': m})
- pdoc['hooks'] = ''.join(hooks)
-
- source = inspect.getsource(mod)
- pdoc['source'] = highlight(source, PythonLexer(), HtmlFormatter())
+ # error class plugins
+ ecp = {'body': to_html(errorclass.__doc__)}
+ ecp.update(std_info)
+ ecp['title'] = 'ErrorClass Plugins'
to_write.append(
('Plugins',
- 'Builtin Plugin: %s' % modname,
- os.path.join(doc, filename), plug_tpl, pdoc))
-
-
-# individual module docs
-b = Browser(['nose','nose.plugins.manager'],
- exclude_modules=['nose.plugins', 'nose.ext'])
-for mod in b.modules(recursive=1):
- if mod.name == 'nose':
- # no need to regenerate, this is the source of the doc index page
- continue
- print mod.qualified_name()
- document_module(mod)
-
-
-# finally build the menu and write all pages
-menu = []
-sections = odict()
-for page in to_write:
- section, _, _, _, _ = page
- sections.setdefault(section, []).append(page)
-
-for section, pages in sections.items():
- menu.append('<h2>%s</h2>' % section)
- menu.append('<ul>')
- pages.sort()
- menu.extend([
- '<li><a href="%s">%s</a></li>' % (os.path.basename(filename), title)
- for _, title, filename, _, _ in pages ])
- menu.append('</ul>')
-
-menu = ''.join(menu)
-for section, title, filename, template, ctx in to_write:
- ctx['menu'] = menu
- write(filename, template, ctx)
-
-# doc section index page
-idx_tpl = open(os.path.join(doc, 'index.html.tpl'), 'r').read()
-idx = {
- 'title': 'API documentation',
- 'menu': menu}
-idx.update(std_info)
-write(os.path.join(doc, 'index.html'), idx_tpl, idx)
+ 'ErrorClass Plugins',
+ os.path.join(doc, 'error_class_plugin.html'), tpl, ecp))
+
+ # interface
+ itf = {'body': to_html(textwrap.dedent(IPluginInterface.__doc__))}
+
+ # methods
+ attr = [(a, getattr(IPluginInterface, a)) for a in dir(IPluginInterface)]
+ methods = [m for m in attr if inspect.ismethod(m[1])]
+ methods.sort()
+ # print "Documenting methods", [a[0] for a in methods]
+
+ method_html = []
+ method_tpl = """
+ <div class="method %(extra_class)s">
+ <a name="%(name)s">
+ <span class="name">%(name)s</span><span class="arg">%(arg)s</span></a>
+ <div class="doc">%(body)s</div>
+ </div>
+ """
+
+ menu_links = {}
+
+ m_attrs = ('_new', 'changed', 'deprecated', 'generative', 'chainable')
+ for m in methods:
+ name, meth = m
+ ec = []
+ for att in m_attrs:
+ if hasattr(meth, att):
+ ec.append(att.replace('_', ''))
+ menu_links.setdefault(att.replace('_', ''), []).append(name)
+ # padding evens the lines
+ print name
+ mdoc = {'body': to_html(textwrap.dedent(' ' + meth.__doc__))}
+ argspec = formatargspec(meth)
+ mdoc.update({'name': name,
+ 'extra_class': ' '.join(ec),
+ 'arg': argspec})
+ method_html.append(method_tpl % mdoc)
+
+ itf['methods'] = ''.join(method_html)
+ itf.update(std_info)
+ itf['title'] = 'Plugin Interface'
+
+ menu = []
+ for section in ('new', 'changed', 'deprecated'):
+ menu.append('<h2>%s methods</h2>' % section.title())
+ menu.append('<ul><li>')
+ menu.append('</li><li>'.join([
+ '<a href="#%(name)s">%(name)s</a>' % {'name': n}
+ for n in menu_links[section]]))
+ menu.append('</li></ul>')
+ itf['sub_menu'] = ''.join(menu)
+ to_write.append(
+ ('Plugins',
+ 'Plugin Interface',
+ os.path.join(doc, 'plugin_interface.html'), api_tpl, itf))
+
+
+ # individual plugin usage docs
+ from nose.plugins.builtin import builtins
+
+ pmeths = [m[0] for m in methods[:]
+ if not 'options' in m[0].lower()]
+ pmeths.append('options')
+ pmeths.sort()
+
+ for modulename, clsname in builtins:
+ _, _, modname = modulename.split('.')
+ mod = resolve_name(modulename)
+ cls = getattr(mod, clsname)
+ filename = os.path.join(doc, 'plugin_%s.html' % modname)
+ print modname, filename
+ if not mod.__doc__:
+ print "No docs"
+ continue
+ pdoc = {'body': to_html(mod.__doc__)}
+ pdoc.update(std_info)
+ pdoc['title'] = 'builtin plugin: %s' % modname
+
+ # options
+ parser = OptionParser(add_help_option=False)
+ plug = cls()
+ plug.addOptions(parser)
+ options = parser.format_option_help()
+ pdoc['options'] = options
+
+ # hooks used
+ hooks = []
+ for m in pmeths:
+ if getattr(cls, m, None):
+ hooks.append('<li><a href="plugin_interface.html#%(name)s">'
+ '%(name)s</a></li>' % {'name': m})
+ pdoc['hooks'] = ''.join(hooks)
+
+ source = inspect.getsource(mod)
+ pdoc['source'] = highlight(source, PythonLexer(), HtmlFormatter())
+ to_write.append(
+ ('Plugins',
+ 'Builtin Plugin: %s' % modname,
+ os.path.join(doc, filename), plug_tpl, pdoc))
+
+
+ # individual module docs
+ b = Browser(['nose','nose.plugins.manager', 'nose.plugins.plugintest'],
+ exclude_modules=['nose.plugins', 'nose.ext'])
+ for mod in b.modules(recursive=1):
+ if mod.name == 'nose':
+ # no need to regenerate, this is the source of the doc index page
+ continue
+ print mod.qualified_name()
+ document_module(mod)
+
+
+ # plugin examples doctests
+ for testfile in plugin_example_tests():
+ document_rst_test(testfile, "Plugin Examples")
+
+
+ # finally build the menu and write all pages
+ menu = []
+ sections = odict()
+ for page in to_write:
+ section, _, _, _, _ = page
+ sections.setdefault(section, []).append(page)
+
+ for section, pages in sections.items():
+ menu.append('<h2>%s</h2>' % section)
+ menu.append('<ul>')
+ pages.sort()
+ menu.extend([
+ '<li><a href="%s">%s</a></li>' % (os.path.basename(filename), title)
+ for _, title, filename, _, _ in pages ])
+ menu.append('</ul>')
+
+ menu = ''.join(menu)
+ for section, title, filename, template, ctx in to_write:
+ ctx['menu'] = menu
+ write(filename, template, ctx)
+
+ # doc section index page
+ idx_tpl = open(os.path.join(doc, 'index.html.tpl'), 'r').read()
+ idx = {
+ 'title': 'API documentation',
+ 'menu': menu}
+ idx.update(std_info)
+ write(os.path.join(doc, 'index.html'), idx_tpl, idx)
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/mkrelease.py b/scripts/mkrelease.py
index eb57bb8..14e21c4 100755
--- a/scripts/mkrelease.py
+++ b/scripts/mkrelease.py
@@ -10,102 +10,121 @@ from commands import getstatusoutput
success = 0
current = os.getcwd()
-
+version = nose.__version__
here = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
parts = here.split('/')
-svn = parts.index('svn')
-svnroot = os.path.join('/', *parts[:svn+1])
+branchindex = parts.index('branches')
+svnroot = os.path.join('/', *parts[:branchindex])
branchroot = os.path.join(svnroot, 'branches')
tagroot = os.path.join(svnroot, 'tags')
svntrunk = os.path.join(svnroot, 'trunk')
svn_trunk_url = 'https://python-nose.googlecode.com/svn/trunk'
+SIMULATE = 'exec' not in sys.argv
+if SIMULATE:
+ print("# simulated run: run as scripts/mkrelease.py exec "
+ "to execute commands")
+
+
def runcmd(cmd):
print cmd
- (status,output) = getstatusoutput(cmd)
- if status != success:
- raise Exception(output)
+ if not SIMULATE:
+ (status,output) = getstatusoutput(cmd)
+ if status != success:
+ raise Exception(output)
+
+
+def cd(dir):
+ print "cd %s" % dir
+ if not SIMULATE:
+ os.chdir(dir)
-version = nose.__version__
-versioninfo = nose.__versioninfo__
-
-os.chdir(svnroot)
-print "cd %s" % svnroot
-
-# FIXME tail of version is hardcoded
-branch = 'branches/%s.%s.0-stable' % (versioninfo[0], versioninfo[1])
-tag = 'tags/%s-release' % version
-
-if os.path.isdir(tag):
- raise Exception("Tag path %s already exists. Can't release same version "
- "twice!")
-
-# make branch, if needed
-if not os.path.isdir(branch):
- # update trunk
- os.chdir(svntrunk)
- print "cd %s" % svntrunk
- runcmd('svn up')
- os.chdir(svnroot)
- print "cd %s" % svnroot
- runcmd('svn copy %s %s' % (svn_trunk_url, branch))
-
- # clean up setup.cfg and check in branch
- os.chdir(branch)
- print "cd %s" % branch
-
- # remove dev tag from setup
- runcmd('cp setup.cfg.release setup.cfg')
- runcmd('svn rm setup.cfg.release --force')
-
- os.chdir(branchroot)
- print "cd %s" % branchroot
- runcmd("svn ci -m 'Release branch for %s'" % version)
-
-else:
- # re-releasing branch
- os.chdir(branch)
- print "cd %s" % branch
- runcmd('svn up')
- os.chdir(svnroot)
- print "cd %s"% svnroot
-
-# make tag from branch
-print "cd %s" % svnroot
-os.chdir(svnroot)
-runcmd('svn copy %s %s' % (branch, tag))
-
-# check in tag
-os.chdir(tagroot)
-print "cd %s" % tagroot
-runcmd("svn ci -m 'Release tag for %s'" % version)
-
-# make docs
-os.chdir(svnroot)
-os.chdir(tag)
-print "cd %s" % tag
-
-runcmd('scripts/mkindex.py')
-runcmd('scripts/mkdocs.py')
-# runcmd('scripts/mkwiki.py')
-
-# setup sdist
-runcmd('python setup.py sdist')
-
-# upload docs and distribution
-if 'NOSE_UPLOAD' in os.environ:
- cv = {'version':version,
- 'upload': os.environ['NOSE_UPLOAD'],
- 'upload_docs': "%s/%s" % (os.environ['NOSE_UPLOAD'], version) }
- cmd = 'scp -C dist/nose-%(version)s.tar.gz %(upload)s' % cv
- runcmd(cmd)
-
- cmd = 'mkdir -p %(upload_docs)s/doc' % cv
-
- cmd = 'scp -C index.html %(upload_docs)s' % cv
- runcmd(cmd)
-
- cmd = 'scp -C doc/*.html doc/*.css doc/*.png %(upload_docs)s/doc' % cv
- runcmd(cmd)
-os.chdir(current)
+def main():
+ cd(svnroot)
+ branch = 'branches/%s-stable' % version
+ tag = 'tags/%s-release' % version
+
+ if os.path.isdir(tag):
+ raise Exception(
+ "Tag path %s already exists. Can't release same version twice!"
+ % tag)
+
+ # make branch, if needed
+ if not os.path.isdir(os.path.join(svnroot, branch)):
+ # update trunk
+ cd(svntrunk)
+ runcmd('svn up')
+ cd(svnroot)
+ runcmd('svn copy %s %s' % (svn_trunk_url, branch))
+
+ # clean up setup.cfg and check in branch
+ cd(branch)
+
+ # remove dev tag from setup
+ runcmd('cp setup.cfg.release setup.cfg')
+ runcmd('svn rm setup.cfg.release --force')
+
+ cd(branchroot)
+ runcmd("svn ci -m 'Release branch for %s'" % version)
+
+ else:
+ # re-releasing branch
+ cd(branch)
+ runcmd('svn up')
+
+ # make tag from branch
+ cd(svnroot)
+ runcmd('svn copy %s %s' % (branch, tag))
+
+ # check in tag
+ cd(tagroot)
+ runcmd("svn ci -m 'Release tag for %s'" % version)
+
+ # make docs
+ cd(svnroot)
+ cd(tag)
+
+ runcmd('scripts/mkindex.py')
+ runcmd('scripts/mkdocs.py')
+ runcmd('scripts/mkwiki.py')
+
+ # FIXME need to do this from an *export* to limit files included
+ # (setuptools includes too many files when run under a checkout)
+ # setup sdist
+ runcmd('python setup.py sdist')
+
+ # upload docs and distribution
+ if 'NOSE_UPLOAD' in os.environ:
+ up = os.environ['NOSE_UPLOAD']
+ cv = {
+ 'host': up[:up.index(':')],
+ 'path': up[up.index(':')+1:],
+ 'version':version,
+ 'upload': up,
+ 'upload_docs': "%s/%s" % (up, version) }
+ cv['versionpath'] = "%(path)s/%(version)s" % cv
+ cv['docpath'] = "%(versionpath)s/doc" % cv
+
+ cmd = 'scp -C dist/nose-%(version)s.tar.gz %(upload)s' % cv
+ runcmd(cmd)
+
+ cmd = 'ssh %(host)s "mkdir -p %(docpath)s"' % cv
+ runcmd(cmd)
+
+ cmd = 'scp -C index.html %(upload_docs)s' % cv
+ runcmd(cmd)
+
+ cmd = ('scp -C doc/*.html doc/*.css doc/*.png '
+ '%(upload_docs)s/doc' % cv)
+ runcmd(cmd)
+
+ cmd = ('ssh %(host)s '
+ '"ln -nfs %(versionpath)s/index.html %(path)s/index.html; '
+ 'ln -nfs %(docpath)s %(path)s/doc"' % cv)
+ runcmd(cmd)
+
+ cd(current)
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/mkwiki.py b/scripts/mkwiki.py
index 4a0a354..eed9e59 100755
--- a/scripts/mkwiki.py
+++ b/scripts/mkwiki.py
@@ -6,7 +6,9 @@ from docutils.nodes import SparseNodeVisitor
from docutils.readers.standalone import Reader
from docutils.writers import Writer
from nose.config import Config
+import nose.plugins
from nose.plugins.manager import BuiltinPluginManager
+from nose.plugins import errorclass
import nose
import os
import pudge.browser
@@ -15,6 +17,8 @@ import sys
import textwrap
import time
+sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
+from mkdocs import formatargspec
# constants
success = 0
@@ -25,28 +29,37 @@ generated and edits above this line will be discarded.*
= Comments =
"""
+wiki_word_re = re.compile(r'^[A-Z][a-z]+(?:[A-Z][a-z]+)+')
def ucfirst(s):
return s[0].upper() + s[1:].lower()
def words(s):
return s.split(' ')
+
+
+def is_wiki_word(text):
+ return wiki_word_re.match(text)
+
def wiki_word(node):
- text = node.astext()
- print "Unknown ref %s" % text
+ orig = text = node.astext()
# handle module/plugin links -- link to code
- if '.' in text:
- parts = text.split('.')
- link = 'http://python-nose.googlecode.com/svn/trunk'
- for p in parts:
- # stop at class names
- if p[0].upper() == p[0]:
- break
- link += '/' + p
- node['refuri'] = link
- return True
- node['refuri'] = ''.join(map(ucfirst, words(text)))
+ if is_wiki_word(text):
+ node['refuri'] = text
+ else:
+ if '.' in text:
+ parts = text.split('.')
+ link = 'http://python-nose.googlecode.com/svn/trunk'
+ for p in parts:
+ # stop at class names
+ if p[0].upper() == p[0]:
+ break
+ link += '/' + p
+ node['refuri'] = link
+ return True
+ node['refuri'] = ''.join(map(ucfirst, words(text)))
+ print "Unknown ref %s -> %s" % (orig, node['refuri'])
del node['refname']
node.resolved = True
return True
@@ -208,7 +221,7 @@ def plugin_interface():
mdoc = []
for m in methods:
# FIXME fix the arg list so literal os.environ is not in there
- mdoc.append('*%s%s*\n\n' % (m.name, m.formatargs()))
+ mdoc.append('*%s%s*\n\n' % (m.name, formatargspec(m.obj)))
# FIXME this is resulting in poorly formatted doc sections
mdoc.append(' ' + m.doc().replace('\n', '\n '))
mdoc.append('\n\n')
@@ -261,6 +274,7 @@ def mkwiki(path):
'NoseFeatures': wikirst(section(nose.__doc__, 'Features')),
'WritingPlugins': wikirst(nose.plugins.__doc__),
'PluginInterface': plugin_interface(),
+ 'ErrorClassPlugin': wikirst(errorclass.__doc__),
'TestingTools': tools(),
'FindingAndRunningTests': wikirst(
section(nose.__doc__, 'Finding and running tests')),
@@ -313,7 +327,7 @@ class Wiki(object):
return (headers, ''.join(content))
except IOError:
self.newpages.append(page)
- return ''
+ return ('', '')
def set_docs(self, page, headers, page_src, docs):
wikified = docs + div
@@ -344,10 +358,20 @@ class Wiki(object):
if page in self.newpages:
runcmd('svn add %s' % self.filename(page))
-
+
+def findwiki(root):
+ if not root or root is '/': # not likely to work on windows
+ raise ValueError("wiki path not found")
+ if not os.path.isdir(root):
+ return findwiki(os.path.dirname(root))
+ entries = os.listdir(root)
+ if 'wiki' in entries:
+ return os.path.join(root, 'wiki')
+ return findwiki(os.path.dirname(root))
+
+
def main():
- path = os.path.abspath(
- os.path.join(os.path.dirname(__file__), '..', '..', '..', 'wiki'))
+ path = findwiki(os.path.abspath(__file__))
mkwiki(path)
diff --git a/setup.cfg b/setup.cfg
index fc71d17..61dde5f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,6 +4,8 @@ tag_svn_revision = 1
[nosetests]
with-doctest=1
+doctest-extension=.rst
[bdist_rpm]
-doc_files = man/man1/nosetests.1
+doc_files = README.txt
+install_script = install-rpm.sh
diff --git a/setup.py b/setup.py
index d2d8bdd..0d12f3b 100644
--- a/setup.py
+++ b/setup.py
@@ -58,7 +58,9 @@ setup(
'http://somethingaboutorange.com/mrl/projects/nose/nose-%s.tar.gz' \
% VERSION,
data_files = [('man/man1', ['nosetests.1'])],
- package_data = {'': ['*.txt']},
+ package_data = {'': ['*.txt',
+ 'examples/*.py',
+ 'examples/*/*.py']},
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
diff --git a/unit_tests/test_cases.py b/unit_tests/test_cases.py
index f4d664c..cc573bc 100644
--- a/unit_tests/test_cases.py
+++ b/unit_tests/test_cases.py
@@ -205,6 +205,30 @@ class TestNoseTestWrapper(unittest.TestCase):
case = nose.case.Test(nose.case.MethodTestCase(Test.test))
self.assertEqual(case.context, Test)
+
+ def test_short_description(self):
+ class TC(unittest.TestCase):
+ def test_a(self):
+ """
+ This is the description
+ """
+ pass
+
+ def test_b(self):
+ """This is the description
+ """
+ pass
+
+ def test_c(self):
+ pass
+
+ case_a = nose.case.Test(TC('test_a'))
+ case_b = nose.case.Test(TC('test_b'))
+ case_c = nose.case.Test(TC('test_c'))
+
+ self.assertEqual(case_a.shortDescription(), "This is the description")
+ self.assertEqual(case_b.shortDescription(), "This is the description")
+ self.assertEqual(case_c.shortDescription(), None)
if __name__ == '__main__':
unittest.main()
diff --git a/unit_tests/test_config.py b/unit_tests/test_config.py
index 54f75a0..84f6464 100644
--- a/unit_tests/test_config.py
+++ b/unit_tests/test_config.py
@@ -54,6 +54,10 @@ class TestNoseConfig(unittest.TestCase):
c.configure(['program', 'foo', 'bar', 'baz.buz.biz'])
self.assertEqual(c.testNames, ['foo', 'bar', 'baz.buz.biz'])
+ c = nose.config.Config(testNames=['foo'])
+ c.configure([])
+ self.assertEqual(c.testNames, ['foo'])
+
def test_where(self):
# we don't need to see our own warnings
warnings.filterwarnings(action='ignore',
diff --git a/unit_tests/test_doctest_munging.rst b/unit_tests/test_doctest_munging.rst
new file mode 100644
index 0000000..fdbce64
--- /dev/null
+++ b/unit_tests/test_doctest_munging.rst
@@ -0,0 +1,105 @@
+doctest output normalization for plugin testing support
+=======================================================
+
+nose.plugins.plugintest.run() is used for testing nose plugins in
+doctests, so it needs to normalise nose output to remove information
+that is not of interest to most plugin tests.
+
+We strip stack trace from formatted exceptions, using a regexp copied
+from ``doctest.py``. That regexp always matches to the end of a
+string, so we split on blank lines before running the regexp on each
+resulting block.
+
+ >>> from nose.plugins.plugintest import blankline_separated_blocks
+ >>> list(blankline_separated_blocks("spam\neggs\n\nfoo\nbar\n\n"))
+ ['spam\neggs\n\n', 'foo\nbar\n\n']
+ >>> list(blankline_separated_blocks("spam\neggs\n\nfoo\nbar\n"))
+ ['spam\neggs\n\n', 'foo\nbar\n']
+ >>> list(blankline_separated_blocks("spam\neggs\n\nfoo\nbar"))
+ ['spam\neggs\n\n', 'foo\nbar']
+ >>> list(blankline_separated_blocks(""))
+ []
+ >>> list(blankline_separated_blocks("spam"))
+ ['spam']
+
+``remove_stack_traces`` removes the stack traces, replacing them with
+an ellipsis. Note the first line here is chosen not to be "Traceback
+(most recent...", since doctest would interpret that as meaning that
+the example should raise an exception!
+
+ >>> from nose.plugins.plugintest import remove_stack_traces
+ >>> print remove_stack_traces("""\
+ ... Ceci n'est pas une traceback.
+ ... Traceback (most recent call last):
+ ... File "/some/dir/foomodule.py", line 15, in runTest
+ ... File "/some/dir/spam.py", line 293, in who_knows_what
+ ... AssertionError: something bad happened
+ ... """)
+ Ceci n'est pas une traceback.
+ Traceback (most recent call last):
+ ...
+ AssertionError: something bad happened
+ <BLANKLINE>
+
+Multiple tracebacks in an example are all replaced, as long as they're
+separated by blank lines.
+
+ >>> print remove_stack_traces("""\
+ ... Ceci n'est pas une traceback.
+ ... Traceback (most recent call last):
+ ... File spam
+ ... AttributeError: eggs
+ ...
+ ... Traceback (most recent call last):
+ ... File eggs
+ ... AttributeError: spam
+ ... """)
+ Ceci n'est pas une traceback.
+ Traceback (most recent call last):
+ ...
+ AttributeError: eggs
+ <BLANKLINE>
+ Traceback (most recent call last):
+ ...
+ AttributeError: spam
+ <BLANKLINE>
+
+
+Putting it together, ``munge_nose_output_for_doctest()`` removes stack
+traces, removes test timings from "Ran n test(s)" output, and strips
+trailing blank lines.
+
+ >>> from nose.plugins.plugintest import munge_nose_output_for_doctest
+ >>> print munge_nose_output_for_doctest("""\
+ ... runTest (foomodule.PassingTest) ... ok
+ ... runTest (foomodule.FailingTest) ... FAIL
+ ...
+ ... ======================================================================
+ ... FAIL: runTest (foomodule.FailingTest)
+ ... ----------------------------------------------------------------------
+ ... Traceback (most recent call last):
+ ... File "/some/dir/foomodule.py", line 15, in runTest
+ ... File "/some/dir/spam.py", line 293, in who_knows_what
+ ... AssertionError: something bad happened
+ ...
+ ... ----------------------------------------------------------------------
+ ... Ran 1 test in 0.082s
+ ...
+ ... FAILED (failures=1)
+ ...
+ ...
+ ... """)
+ runTest (foomodule.PassingTest) ... ok
+ runTest (foomodule.FailingTest) ... FAIL
+ <BLANKLINE>
+ ======================================================================
+ FAIL: runTest (foomodule.FailingTest)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+ AssertionError: something bad happened
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 1 test in ...s
+ <BLANKLINE>
+ FAILED (failures=1)
diff --git a/unit_tests/test_id_plugin.py b/unit_tests/test_id_plugin.py
new file mode 100644
index 0000000..d70fc07
--- /dev/null
+++ b/unit_tests/test_id_plugin.py
@@ -0,0 +1,20 @@
+import unittest
+from nose.config import Config
+from nose.plugins.builtin import TestId
+import mock
+
+class TestTestIdPlugin(unittest.TestCase):
+
+ def test_default_id_file_is_in_working_dir(self):
+ tid = TestId()
+ c = Config()
+ opt = mock.Bucket()
+ opt.testIdFile = '.noseids'
+ tid.configure(opt, c)
+ print tid.idfile
+ assert tid.idfile.startswith(c.workingDir), \
+ "%s is not under %s" % (tid.idfile, c.workingDir)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/unit_tests/test_issue_100.rst b/unit_tests/test_issue_100.rst
new file mode 100644
index 0000000..ea5d9d1
--- /dev/null
+++ b/unit_tests/test_issue_100.rst
@@ -0,0 +1,12 @@
+This is a test of the bug reported in issue 100: test.address() fails
+for a case defined in a doctest.
+
+ >>> import unittest
+ >>> import nose.case
+ >>> class SimpleTest(unittest.TestCase):
+ ...
+ ... def runTest(self):
+ ... pass
+ >>> test = nose.case.Test(SimpleTest())
+ >>> test.address()
+ (None, '__builtin__', 'SimpleTest.runTest')
diff --git a/unit_tests/test_issue_101.py b/unit_tests/test_issue_101.py
new file mode 100644
index 0000000..cccfc42
--- /dev/null
+++ b/unit_tests/test_issue_101.py
@@ -0,0 +1,24 @@
+import sys
+import unittest
+import warnings
+from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
+
+class TestErrorClassWithStringException(unittest.TestCase):
+
+ def test_string_exception_not_masked(self):
+
+ class X(Exception):
+ pass
+
+ class EP(ErrorClassPlugin):
+ xes = ErrorClass(X, label='XXX', isfailure=True)
+
+ warnings.filterwarnings(action='ignore', category=DeprecationWarning)
+ try:
+
+ raise "oh no!"
+ except:
+ exc = sys.exc_info()
+
+ ep = EP()
+ self.assertEqual(ep.addError(None, exc), None)
diff --git a/unit_tests/test_loader.py b/unit_tests/test_loader.py
index 2d951e9..2f6e3e5 100644
--- a/unit_tests/test_loader.py
+++ b/unit_tests/test_loader.py
@@ -4,10 +4,16 @@ import sys
import unittest
from nose.loader import TestLoader as Loader
-from nose import util # so we can set its __import__
+from nose import util, loader, selector # so we can set mocks
import nose.case
+def safepath(p):
+ """Helper function to make cross-platform safe paths
+ """
+ return p.replace('/', os.sep)
+
+
def mods():
#
# Setting up the fake modules that we'll use for testing
@@ -17,14 +23,15 @@ def mods():
M['test_module'] = imp.new_module('test_module')
M['module'] = imp.new_module('module')
M['package'] = imp.new_module('package')
- M['package'].__path__ = ['/package']
- M['package'].__file__ = '/package/__init__.py'
+ M['package'].__path__ = [safepath('/package')]
+ M['package'].__file__ = safepath('/package/__init__.py')
M['package.subpackage'] = imp.new_module('package.subpackage')
M['package'].subpackage = M['package.subpackage']
- M['package.subpackage'].__path__ = ['/package/subpackage']
- M['package.subpackage'].__file__ = '/package/subpackage/__init__.py'
- M['test_module_with_generators'] = imp.new_module('test_module_with_generators')
-
+ M['package.subpackage'].__path__ = [safepath('/package/subpackage')]
+ M['package.subpackage'].__file__ = safepath(
+ '/package/subpackage/__init__.py')
+ M['test_module_with_generators'] = imp.new_module(
+ 'test_module_with_generators')
# a unittest testcase subclass
class TC(unittest.TestCase):
@@ -117,6 +124,7 @@ M = mods()
_listdir = os.listdir
_isdir = os.path.isdir
_isfile = os.path.isfile
+_exists = os.path.exists
_import = __import__
@@ -124,20 +132,24 @@ _import = __import__
# Mock functions
#
def mock_listdir(path):
- if path.endswith('/package'):
+ if path.endswith(safepath('/package')):
return ['.', '..', 'subpackage', '__init__.py']
- elif path.endswith('/subpackage'):
+ elif path.endswith(safepath('/subpackage')):
return ['.', '..', '__init__.py']
- elif path.endswith('/sort'):
+ elif path.endswith(safepath('/sort')):
return ['.', '..', 'lib', 'src', 'test', 'test_module.py', 'a_test']
return ['.', '..', 'test_module.py', 'module.py']
def mock_isdir(path):
print "is dir '%s'?" % path
- if path in ('/a/dir/path', '/package', '/package/subpackage',
- '/sort/lib', '/sort/src', '/sort/a_test', '/sort/test',
- '/sort'):
+ paths = map(safepath, [
+ '/a/dir/path', '/package',
+ '/package/subpackage', '/sort/lib',
+ '/sort/src', '/sort/a_test',
+ '/sort/test', '/sort'])
+ paths = paths + map(os.path.abspath, paths)
+ if path in paths:
return True
return False
@@ -148,6 +160,16 @@ def mock_isfile(path):
return '.' in path
+def mock_exists(path):
+ print "exists '%s'?" % path
+ paths = map(safepath, [
+ '/package', '/package/__init__.py', '/package/subpackage',
+ '/package/subpackage/__init__.py'
+ ])
+ paths = paths + map(os.path.abspath, paths)
+ return path in paths
+
+
def mock_import(modname, gl=None, lc=None, fr=None):
if gl is None:
gl = M
@@ -185,15 +207,17 @@ class TestTestLoader(unittest.TestCase):
def setUp(self):
os.listdir = mock_listdir
- os.path.isdir = mock_isdir
- os.path.isfile = mock_isfile
+ loader.op_isdir = selector.op_isdir = os.path.isdir = mock_isdir
+ loader.op_isfile = selector.op_isfile = os.path.isfile = mock_isfile
+ selector.op_exists = os.path.exists = mock_exists
util.__import__ = mock_import
self.l = Loader(importer=MockImporter())#, context=MockContext)
def tearDown(self):
os.listdir = _listdir
- os.path.isdir = _isdir
- os.path.isfile = _isfile
+ loader.op_isdir = selector.op_isdir = os.path.isdir = _isdir
+ loader.op_isfile = selector.op_isfile = os.path.isfile = _isfile
+ selector.op_exists = os.path.exists = _exists
util.__import__ = _import
def test_lint(self):
@@ -208,7 +232,7 @@ class TestTestLoader(unittest.TestCase):
def test_load_from_name_dir_abs(self):
print "load from name dir"
l = self.l
- suite = l.loadTestsFromName('/a/dir/path')
+ suite = l.loadTestsFromName(safepath('/a/dir/path'))
tests = [t for t in suite]
self.assertEqual(len(tests), 1)
@@ -361,17 +385,17 @@ class TestTestLoader(unittest.TestCase):
def test_load_from_name_package_root_path(self):
print "load from name package root path"
l = self.l
- suite = l.loadTestsFromName('/package')
+ suite = l.loadTestsFromName(safepath('/package'))
print suite
tests = [t for t in suite]
assert len(tests) == 1, "Expected one test, got %s" % tests
tests = list(tests[0])
assert not tests, "The full test list %s was not empty" % tests
- def test_load_from_name_subpackage_path(self):
+ def test_load_from_name_subpackage_safepath(self):
print "load from name subpackage path"
l = self.l
- suite = l.loadTestsFromName('/package/subpackage')
+ suite = l.loadTestsFromName(safepath('/package/subpackage'))
print suite
tests = [t for t in suite]
assert len(tests) == 0, "Expected no tests, got %s" % tests
diff --git a/unit_tests/test_plugin.py b/unit_tests/test_plugin.py
new file mode 100644
index 0000000..aa2d9cc
--- /dev/null
+++ b/unit_tests/test_plugin.py
@@ -0,0 +1,33 @@
+import optparse
+import unittest
+
+import nose.plugins
+
+
+class OptionProcessingTests(unittest.TestCase):
+
+ def test_enable_plugin(self):
+ class NamedPlugin(nose.plugins.Plugin):
+ name = "jim-bob"
+ def parse_options(env, args_in):
+ plugin = NamedPlugin()
+ parser = optparse.OptionParser()
+ plugin.options(parser, env)
+ options, args = parser.parse_args(args_in)
+ return options
+ options = parse_options({}, [])
+ assert not options.enable_plugin_jim_bob, \
+ "Plugin should not be enabled"
+ options = parse_options({"NOSE_WITH_JIM_BOB": "1"}, [])
+ assert options.enable_plugin_jim_bob, \
+ "Plugin should be enabled"
+ options = parse_options({}, ["--with-jim-bob"])
+ assert options.enable_plugin_jim_bob, \
+ "Plugin should be enabled"
+ options = parse_options({"NOSE_WITH_JIM_BOB": "1"}, ["--with-jim-bob"])
+ assert options.enable_plugin_jim_bob, \
+ "Plugin should be enabled"
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/unit_tests/test_plugin_manager.py b/unit_tests/test_plugin_manager.py
index 2ad359d..4dc79e7 100644
--- a/unit_tests/test_plugin_manager.py
+++ b/unit_tests/test_plugin_manager.py
@@ -21,6 +21,14 @@ class Plug2(Plugin):
def addError(self, test, err):
assert False, "Should not have been called"
+class Plug3(Plugin):
+ def loadTestsFromModule(self, module):
+ raise TypeError("I don't like to type")
+
+class Plug4(Plugin):
+ def loadTestsFromModule(self, module):
+ raise AttributeError("I am missing my nose")
+
class TestPluginManager(unittest.TestCase):
@@ -45,5 +53,15 @@ class TestPluginManager(unittest.TestCase):
assert not expect, \
"Some plugins were not found by iteration: %s" % expect
+ def test_plugin_generative_method_errors_not_hidden(self):
+ import nose.case
+ pm = PluginManager(plugins=[Plug3(), Plug4()])
+ loaded = list(pm.loadTestsFromModule('whatever'))
+ self.assertEqual(len(loaded), 2)
+ for test in loaded:
+ assert isinstance(test, nose.case.Failure), \
+ "%s is not a failure" % test
+
+
if __name__ == '__main__':
unittest.main()