Permalink
Browse files

Merged 0.10.0-stable [282]:[308] into trunk

  • Loading branch information...
1 parent 975d3d0 commit 65b2975d6c4e6af7a64725987a5838d3e71245e5 @jpellerin jpellerin committed Aug 12, 2007
Showing with 1,983 additions and 200 deletions.
  1. +19 −0 CHANGELOG
  2. +11 −6 NEWS
  3. +2 −2 doc/errorclassplugin.html
  4. +2 −2 doc/index.html
  5. +3 −5 doc/module_nose.case.html
  6. +3 −3 doc/module_nose.commands.html
  7. +2 −2 doc/module_nose.config.html
  8. +41 −4 doc/module_nose.core.html
  9. +2 −2 doc/module_nose.exc.html
  10. +2 −2 doc/module_nose.importer.html
  11. +2 −2 doc/module_nose.inspector.html
  12. +2 −2 doc/module_nose.loader.html
  13. +40 −13 doc/module_nose.plugins.manager.html
  14. +2 −2 doc/module_nose.proxy.html
  15. +2 −2 doc/module_nose.result.html
  16. +2 −2 doc/module_nose.selector.html
  17. +13 −7 doc/module_nose.suite.html
  18. +2 −2 doc/module_nose.tools.html
  19. +2 −2 doc/module_nose.twistedtools.html
  20. +4 −3 doc/module_nose.util.html
  21. +4 −0 doc/plugin.html.tpl
  22. +220 −2 doc/plugin_attrib.html
  23. +99 −3 doc/plugin_capture.html
  24. +148 −2 doc/plugin_cover.html
  25. +62 −2 doc/plugin_debug.html
  26. +52 −2 doc/plugin_deprecated.html
  27. +226 −2 doc/plugin_doctests.html
  28. +49 −2 doc/plugin_failuredetail.html
  29. +16 −5 doc/plugin_interface.html
  30. +104 −2 doc/plugin_isolate.html
  31. +107 −2 doc/plugin_prof.html
  32. +53 −2 doc/plugin_skip.html
  33. +157 −2 doc/plugin_testid.html
  34. +69 −0 doc/site.css
  35. +19 −10 doc/writing_plugins.html
  36. +20 −16 examples/html_plugin/htmlplug.py
  37. +1 −1 examples/html_plugin/setup.py
  38. +1 −1 examples/plugin/setup.py
  39. +9 −0 functional_tests/support/issue038/test.py
  40. +4 −0 functional_tests/support/issue072/test.py
  41. +45 −0 functional_tests/test_collector.py
  42. +45 −0 functional_tests/test_issue_072.py
  43. +1 −1 functional_tests/test_loader.py
  44. +24 −0 functional_tests/test_plugins.py
  45. +3 −3 index.html.tpl
  46. +1 −1 nose/__init__.py
  47. +4 −3 nose/case.py
  48. +0 −1 nose/commands.py
  49. +52 −7 nose/core.py
  50. +3 −2 nose/loader.py
  51. +21 −12 nose/plugins/__init__.py
  52. +18 −5 nose/plugins/base.py
  53. +6 −2 nose/plugins/capture.py
  54. +1 −2 nose/plugins/failuredetail.py
  55. +58 −12 nose/plugins/manager.py
  56. +5 −0 nose/plugins/testid.py
  57. +9 −9 nose/proxy.py
  58. +20 −0 nose/suite.py
  59. +3 −7 nose/util.py
  60. +19 −5 scripts/mkdocs.py
  61. +7 −2 scripts/mkrelease.py
  62. +24 −2 scripts/mkwiki.py
  63. +5 −0 unit_tests/support/issue065/tests.py
  64. +1 −1 unit_tests/test_capture_plugin.py
  65. +10 −2 unit_tests/test_config.py
  66. +20 −0 unit_tests/test_issue_065.py
View
19 CHANGELOG
@@ -1,3 +1,22 @@
+0.10.0b1
+
+- Added support for a description attribute on tests in function and
+ method test cases. Most useful for generators: set the description
+ attribute on the yielded function.
+- Fixed incorrect signature of addSuccess() method in
+ IPluginInterface. Thanks to nosexunit for the bug report. (Issue
+ #68).
+- Fixed isclass() function in nose.util so that it will not raise an
+ exception when examining instances that have no accessible __bases__
+ attribute. (Issue #65).
+- Fixed passing of tests to result; the test itself and not the
+ wrapper was being passed, resulting in test description plugin hooks
+ not being called. (Issue #71).
+- Fixed bugs in FailureDetail and Capture plugins, and plugin manager
+ and proxy uses of chainable plugin calls. Thanks to Ian Bicking for
+ the bug report (Issue #72).
+- Improved documentation.
+
0.10.0a2
- Changed entry point name to nose.plugins.0.10 -- dashes and other
View
17 NEWS
@@ -1,14 +1,19 @@
-What's New In 0.10a2
+What's New In 0.10b1
--------------------
.. note:: The entry point for 0.10-series plugins is now
**nose.plugins.0.10**.
-Release 0.10a2 is a bugfix release. Among other bugs, it fixes major
-bugs in plugin loading and working-directory handling. The most
-important change in this release is a change to the name of the entry
-point used for 0.10-series plugins. The previous entry point,
-nose.plugins.0-10, contained an illegal character.
+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
0.9 series in philosophy and implementation.
View
4 doc/errorclassplugin.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
View
4 doc/index.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
</div>
<div id="main">
View
8 doc/module_nose.case.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
@@ -67,9 +67,7 @@
</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 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 into a useable form, including
-appending captured output and assert introspection information, if
-so configured.</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>
</div></div><div class="method section inherited"><span class="method name">failIfAlmostEqual<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 equal as determined by their
View
6 doc/module_nose.commands.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
@@ -109,7 +109,7 @@
'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-html-output&#39;, None, &#39;Enable plugin HtmlOutput: Output test results as ugly, unstyled html.\n [NOSE_WITH_HTML-OUTPUT]&#39;), (&#39;with-watch&#39;, None, &#39;Enable plugin NoseWatch: watch failing tests, re-testing when modified\n [NOSE_WITH_WATCH]&#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: `emacsclient`)&#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=[&#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>
<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>
View
4 doc/module_nose.config.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
</div>
View
45 doc/module_nose.core.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
@@ -81,6 +81,30 @@
<p>All configuration files that are found will be loaded and their options
combined.</p>
</div>
+<div class="section">
+<h1><a id="using-plugins" name="using-plugins">Using Plugins</a></h1>
+<p>There are numerous nose plugins available via easy_install and
+elsewhere. To use a plugin, just install it. The plugin will add
+command line options to nosetests. To verify that the plugin is installed,
+run:</p>
+<blockquote>
+nosetests --plugins</blockquote>
+<p>You can add -v or -vv to that command to show more information
+about each plugin.</p>
+</div>
+<div class="section">
+<h1><a id="plugins" name="plugins">0.9 plugins</a></h1>
+<p>nose 0.10 can use SOME plugins that were written for nose 0.9. The
+default plugin manager inserts a compatibility wrapper around 0.9
+plugins that adapts the changed plugin api calls. However, plugins
+that access nose internals are likely to fail, especially if they
+attempt to access test case or test suite classes. For example,
+plugins that try to determine if a test passed to startTest is an
+individual test or a suite will fail, partly because suites are no
+longer passed to startTest and partly because it's likely that the
+plugin is trying to find out if the test is an instance of a class
+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
test loader.</p>
@@ -109,7 +133,7 @@
<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 0x2b4a2aeb6210>, 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 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
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>
@@ -132,7 +156,20 @@
tests in __main__. Additional arguments to TestProgram may be passed
as keyword arguments.</p>
</div></div>
-<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>Collect and run test, returning success or failure.</p>
+<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>Collect and run tests, returning success or failure.</p>
+<p>The arguments to <cite>run()</cite> are the same as to <cite>main()</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 (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>
+</ul>
+<p>With the exception that the <tt class="docutils literal"><span class="pre">exit</span></tt> argument is always set
+to False.</p>
</div></div>
</div>
View
4 doc/module_nose.exc.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
View
4 doc/module_nose.importer.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
View
4 doc/module_nose.inspector.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
View
4 doc/module_nose.loader.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#TestLoader">TestLoader</a></li><li><a href="#defaultTestLoader">defaultTestLoader</a></li></ul>
</div>
View
53 doc/module_nose.plugins.manager.html
@@ -6,22 +6,49 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
<div id="main">
<h1>nose: nose.plugins.manager</h1>
- <p>A plugin manager class is used to load plugins and proxy calls
-to plugins.</p>
-<p>FIXME docs</p>
-<ul class="simple">
-<li>Built in</li>
-<li>Entry point</li>
-</ul>
+ <p>A plugin manager class is used to load plugins, manage the list of
+loaded plugins, and proxy calls to those plugins.</p>
+<p>The plugin managers provided with nose are:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">PluginManager</span></tt></dt>
+<dd>This manager doesn't implement loadPlugins, so it can only work
+with a static list of plugins.</dd>
+<dt><tt class="docutils literal"><span class="pre">BuiltinPluginManager</span></tt></dt>
+<dd>This manager loads plugins referenced in <tt class="docutils literal"><span class="pre">nose.plugins.builtin</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">EntryPointPluginManager</span></tt></dt>
+<dd>This manager uses setuptools entrypoints to load plugins.</dd>
+<dt><tt class="docutils literal"><span class="pre">DefaultPluginMananger</span></tt></dt>
+<dd>This is the manager class that will be used by default. If
+setuptools is installed, it is a subclass of
+<tt class="docutils literal"><span class="pre">EntryPointPluginManager</span></tt> and <tt class="docutils literal"><span class="pre">BuiltinPluginManager</span></tt>; otherwise, an
+alias to <tt class="docutils literal"><span class="pre">BuiltinPluginManager</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">RestrictedPluginManager</span></tt></dt>
+<dd>This manager is for use in test runs where some plugin calls are
+not available, such as runs started with <cite>python setup.py test</cite>,
+where the test runner is the default unittest <tt class="docutils literal"><span class="pre">TextTestRunner</span></tt>. It
+is a subclass of <tt class="docutils literal"><span class="pre">DefaultPluginManager</span></tt>.</dd>
+</dl>
+<div class="section">
+<h1><a id="writing-a-plugin-manager" name="writing-a-plugin-manager">Writing a plugin manager</a></h1>
+<p>If you want to load plugins via some other means, you can write a
+plugin manager and pass an instance of your plugin manager class when
+instantiating the <a class="reference" href="module_nose.config.html#Config">nose.config.Config</a> instance that you pass to
+<tt class="docutils literal"><span class="pre">TestProgram</span></tt> (or <tt class="docutils literal"><span class="pre">main</span></tt> or <tt class="docutils literal"><span class="pre">run</span></tt>).</p>
+<p>To implement your plugin loading scheme, implement <tt class="docutils literal"><span class="pre">loadPlugins()</span></tt>,
+and in that method, call <tt class="docutils literal"><span class="pre">addPlugin()</span></tt> with an instance each plugin
+you wish to make available. Make sure to call
+<tt class="docutils literal"><span class="pre">super(self).loadPlugins()</span></tt> as well if have subclassed a manager
+other than <tt class="docutils literal"><span class="pre">PluginManager</span></tt>.</p>
+</div>
<h2>Classes</h2>
<p>Highlighted methods are defined in this class.</p><a name="DefaultPluginManager"></a><div class="cls section"><span class="cls name">DefaultPluginManager</span> (<a href="module_nose.plugins.manager.html#BuiltinPluginManager">BuiltinPluginManager</a>, <a href="module_nose.plugins.manager.html#EntryPointPluginManager">EntryPointPluginManager</a>)<div class="cls doc"><h3>Methods</h3><div class="method section inherited"><span class="method name">__init__<span class="args">(self, plugins=(), proxyClass=None)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">__iter__<span class="args">(self)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">_get_plugins<span class="args">(self)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">_set_plugins<span class="args">(self, plugins)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">addPlugin<span class="args">(self, plug)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">addPlugins<span class="args">(self, plugins)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">configure<span class="args">(self, options, config)</span></span><span class="method inherited">(inherited from PluginManager)</span><div class="method doc"><p>Configure the set of plugins with the given options
and config instance. After configuration, disabled plugins
@@ -33,10 +60,7 @@
<a name="PluginManager"></a><div class="cls section"><span class="cls name">PluginManager</span> (object)<div class="cls doc"><p>Base class for plugin managers. Does not implement loadPlugins, so it
may only be used with a static list of plugins.</p>
<p>The basic functionality of a plugin manager is to proxy all unknown
-attributes through <a href="#id1" name="id2"><span class="problematic" id="id2">`</span></a>PluginProxy`s to a list of plugins.</p>
-<div class="system-message" id="id1">
-<p class="system-message-title">System Message: <a name="id1">WARNING/2</a> (<tt class="docutils">&lt;string&gt;</tt>, line 4); <em><a href="#id2">backlink</a></em></p>
-Inline interpreted text or phrase reference start-string without end-string.</div>
+attributes through a <tt class="docutils literal"><span class="pre">PluginProxy</span></tt> to a list of plugins.</p>
<p>Note that the list of plugins <em>may not</em> be changed after the first plugin
call.</p>
<h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(self, plugins=(), proxyClass=None)</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><div class="method section"><span class="method name">_get_plugins<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_set_plugins<span class="args">(self, plugins)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">addPlugin<span class="args">(self, plug)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">addPlugins<span class="args">(self, plugins)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">configure<span class="args">(self, options, config)</span></span><div class="method doc"><p>Configure the set of plugins with the given options
@@ -75,6 +99,9 @@
</div></div></div></div>
<a name="PluginProxy"></a><div class="cls section"><span class="cls name">PluginProxy</span> (object)<div class="cls doc"><p>Proxy for plugin calls. Essentially a closure bound to the
given call and plugin list.</p>
+<p>The plugin proxy also must be bound to a particular plugin
+interface specification, so that it knows what calls are available
+and any special handling that is required for each call.</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"><span class="method name">__init__<span class="args">(self, call, plugins)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_loadTestsFromNames<span class="args">(self, names, module=None)</span></span><div class="method doc"><p>Chainable but not quite normal. Plugins return a tuple of
(tests, names) after processing the names. The tests are added
to a suite that is accumulated throughout the full call, while
View
4 doc/module_nose.proxy.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
View
4 doc/module_nose.result.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
View
4 doc/module_nose.selector.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#Selector">Selector</a></li><li><a href="#defaultSelector">defaultSelector</a></li><li><a href="#TestAddress">TestAddress</a></li></ul>
</div>
View
20 doc/module_nose.suite.html
@@ -6,10 +6,10 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#MixedContextError">MixedContextError</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="#TestDir">TestDir</a></li></ul><h2>Attributes</h2><ul><li><a href="#log">log</a></li><li><a href="#generators">generators</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>
<div id="main">
@@ -20,9 +20,12 @@
(setup/teardown functions or methods) for the context that contains
its tests.</p>
<h2>Classes</h2>
-<p>Highlighted methods are defined in this class.</p><a name="MixedContextError"></a><div class="cls section"><span class="cls name">MixedContextError</span> (exceptions.Exception)<div class="cls doc"><p>Error raised when a context suite sees tests from more than
-one context.</p>
-<h3>Methods</h3><div class="method section inherited"><span class="method name">__getitem__<span class="args">(...)</span></span><span class="method inherited">(inherited from Exception)</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 Exception)</span><div class="method doc"></div></div></div></div>
+<p>Highlighted methods are defined in this class.</p><a name="FinalizingSuiteWrapper"></a><div class="cls section"><span class="cls name">FinalizingSuiteWrapper</span> (unittest.TestSuite)<div class="cls doc"><p>Wraps suite and calls final function after suite has
+executed. Used to call final functions in cases (like running in
+the standard test runner) where test running is not under nose's
+control.</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"><span class="method name">__init__<span class="args">(self, suite, finalize)</span></span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">__iter__<span class="args">(self)</span></span><span class="method inherited">(inherited from TestSuite)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">addTest<span class="args">(self, test)</span></span><span class="method inherited">(inherited from TestSuite)</span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">addTests<span class="args">(self, tests)</span></span><span class="method inherited">(inherited from TestSuite)</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 TestSuite)</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 TestSuite)</span><div class="method doc"><p>Run the tests without collecting errors in a TestResult</p>
+</div></div><div class="method section"><span class="method name">run<span class="args">(self, *arg, **kw)</span></span><div class="method doc"></div></div></div></div>
<a name="ContextSuite"></a><div class="cls section"><span class="cls name">ContextSuite</span> (<a href="module_nose.suite.html#LazySuite">LazySuite</a>)<div class="cls doc"><p>A suite with context.</p>
<p>A ContextSuite executes fixtures (setup and teardown functions or
methods) for the context containing its tests.</p>
@@ -46,7 +49,7 @@
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 0x2b4a2aefe050>)</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 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
packages and modules containing the context), in order of
descent with the outermost ancestor last.
This method is a generator.</p>
@@ -74,6 +77,9 @@
</div></div><div class="method section"><span class="method name">__iter__<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">__nonzero__<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_get_tests<span class="args">(self)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">_set_tests<span class="args">(self, tests)</span></span><div class="method doc"></div></div><div class="method section"><span class="method name">addTest<span class="args">(self, test)</span></span><div class="method doc"></div></div><div class="method section inherited"><span class="method name">addTests<span class="args">(self, tests)</span></span><span class="method inherited">(inherited from TestSuite)</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 TestSuite)</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 TestSuite)</span><div class="method doc"><p>Run the tests without collecting errors in a TestResult</p>
</div></div><div class="method section inherited"><span class="method name">run<span class="args">(self, result)</span></span><span class="method inherited">(inherited from TestSuite)</span><div class="method doc"></div></div><h3>Attributes</h3><div class="attr section"><span class="attr name">_tests</span><pre class="attr value">Default value: (property)</pre><div class="attr doc"><p>Access the tests in this suite. Access is through a generator, so iteration may not be repeatable.</p>
</div></div></div></div>
+<a name="MixedContextError"></a><div class="cls section"><span class="cls name">MixedContextError</span> (exceptions.Exception)<div class="cls doc"><p>Error raised when a context suite sees tests from more than
+one context.</p>
+<h3>Methods</h3><div class="method section inherited"><span class="method name">__getitem__<span class="args">(...)</span></span><span class="method inherited">(inherited from Exception)</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 Exception)</span><div class="method doc"></div></div></div></div>
<a name="TestDir"></a><div class="cls section"><span class="cls name">TestDir</span> ()<div class="cls doc"><h3>Methods</h3><div class="method section"><span class="method name">__init__<span class="args">(*arg, **kw)</span></span><div class="method doc"></div></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="generators"></a><div class="attr section"><span class="attr name">generators</span><pre class="attr value">Default value: _Feature((2, 2, 0, &#39;alpha&#39;, 1), (2, 3, 0, &#39;final&#39;, 0), 4096)</pre><div class="attr doc"></div></div>
View
4 doc/module_nose.tools.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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>
View
4 doc/module_nose.twistedtools.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>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>
View
7 doc/module_nose.util.html
@@ -6,10 +6,10 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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="#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="#CO_GENERATOR">CO_GENERATOR</a></li><li><a href="#ident_re">ident_re</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>
<div id="main">
@@ -165,6 +165,7 @@
</pre>
</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>
<a name="CO_GENERATOR"></a><div class="attr section"><span class="attr name">CO_GENERATOR</span><pre class="attr value">Default value: 32</pre><div class="attr doc"></div></div>
<a name="ident_re"></a><div class="attr section"><span class="attr name">ident_re</span><pre class="attr value">Default value: &lt;_sre.SRE_Pattern object&gt;</pre><div class="attr doc"></div></div>
View
4 doc/plugin.html.tpl
@@ -29,6 +29,10 @@
<pre>%(options)s</pre>
+ <h2>Source</h2>
+
+ %(source)s
+
</div>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
View
222 doc/plugin_attrib.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
@@ -82,6 +82,224 @@
expression EXPR evaluates to True [NOSE_EVAL_ATTR]
</pre>
+ <h2>Source</h2>
+
+ <div class="highlight"><pre><span class="sd">&quot;&quot;&quot;Attribute selector plugin.</span>
+
+<span class="sd">Simple syntax (-a, --attr) examples:</span>
+
+<span class="sd">* `nosetests -a status=stable`:</span>
+<span class="sd"> Only test cases with attribute &quot;status&quot; having value &quot;stable&quot;</span>
+
+<span class="sd">* `nosetests -a priority=2,status=stable`:</span>
+<span class="sd"> Both attributes must match</span>
+
+<span class="sd">* `nosetests -a priority=2 -a slow`:</span>
+<span class="sd"> Either attribute must match</span>
+<span class="sd"> </span>
+<span class="sd">* `nosetests -a tags=http`:</span>
+<span class="sd"> Attribute list &quot;tags&quot; must contain value &quot;http&quot; (see test_foobar()</span>
+<span class="sd"> below for definition)</span>
+
+<span class="sd">* `nosetests -a slow`:</span>
+<span class="sd"> Attribute &quot;slow&quot; must be defined and its value cannot equal to False</span>
+<span class="sd"> (False, [], &quot;&quot;, etc...)</span>
+
+<span class="sd">* `nosetests -a !slow`:</span>
+<span class="sd"> Attribute &quot;slow&quot; must NOT be defined or its value must be equal to False</span>
+
+<span class="sd">Eval expression syntax (-A, --eval-attr) examples:</span>
+
+<span class="sd">* `nosetests -A &quot;not slow&quot;`</span>
+
+<span class="sd">* `nosetests -A &quot;(priority &gt; 5) and not slow&quot;`</span>
+
+<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>
+<span class="k">from</span> <span class="nn">nose.util</span> <span class="k">import</span> <span class="n">tolist</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="s">&#39;nose.plugins.attrib&#39;</span><span class="p">)</span>
+<span class="n">compat_24</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">version_info</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
+
+<span class="k">class</span> <span class="nc">ContextHelper</span><span class="p">:</span>
+ <span class="sd">&quot;&quot;&quot;Returns default values for dictionary lookups.&quot;&quot;&quot;</span>
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">obj</span> <span class="o">=</span> <span class="n">obj</span>
+
+ <span class="k">def</span> <span class="nf">__getitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
+ <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">obj</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="bp">False</span><span class="p">)</span>
+
+
+<span class="k">class</span> <span class="nc">AttributeGetter</span><span class="p">:</span>
+ <span class="sd">&quot;&quot;&quot;Helper for looking up attributes</span>
+<span class="sd"> </span>
+<span class="sd"> First we check the method, and if the attribute is not present,</span>
+<span class="sd"> we check the method&#39;s class.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="n">missing</span> <span class="o">=</span> <span class="nb">object</span><span class="p">()</span>
+
+ <span class="k">def</span> <span class="nf">__init__</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="n">method</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">cls</span> <span class="o">=</span> <span class="n">cls</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">method</span> <span class="o">=</span> <span class="n">method</span>
+
+ <span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</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="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&#39;Get </span><span class="si">%s</span><span class="s"> from </span><span class="si">%s</span><span class="s">.</span><span class="si">%s</span><span class="s">&#39;</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">cls</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="p">)</span>
+ <span class="n">val</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="o">.</span><span class="n">__dict__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">missing</span><span class="p">)</span>
+ <span class="k">if</span> <span class="n">val</span> <span class="ow">is</span> <span class="bp">self</span><span class="o">.</span><span class="n">missing</span><span class="p">:</span>
+ <span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&#39;No attribute </span><span class="si">%s</span><span class="s"> in method, getting from class&#39;</span><span class="p">,</span>
+ <span class="n">name</span><span class="p">)</span>
+ <span class="n">val</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span>
+ <span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s">&#39;Class attribute </span><span class="si">%s</span><span class="s"> value: </span><span class="si">%s</span><span class="s">&#39;</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">val</span><span class="p">)</span>
+ <span class="k">return</span> <span class="n">val</span>
+
+<span class="k">class</span> <span class="nc">AttributeSelector</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+ <span class="sd">&quot;&quot;&quot;Selects test cases to be run based on their attributes.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="n">Plugin</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span> <span class="o">=</span> <span class="p">[]</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="sd">&quot;&quot;&quot;Add command-line options for this plugin.&quot;&quot;&quot;</span>
+
+ <span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&quot;-a&quot;</span><span class="p">,</span> <span class="s">&quot;--attr&quot;</span><span class="p">,</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;attr&quot;</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">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_ATTR&#39;</span><span class="p">),</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Run only tests that have attributes &quot;</span>
+ <span class="s">&quot;specified by ATTR [NOSE_ATTR]&quot;</span><span class="p">)</span>
+ <span class="c"># disable in &lt; 2.4: eval can&#39;t take needed args</span>
+ <span class="k">if</span> <span class="n">compat_24</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">&quot;-A&quot;</span><span class="p">,</span> <span class="s">&quot;--eval-attr&quot;</span><span class="p">,</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;eval_attr&quot;</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="s">&quot;EXPR&quot;</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">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_EVAL_ATTR&#39;</span><span class="p">),</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Run only tests for whose attributes &quot;</span>
+ <span class="s">&quot;the Python expression EXPR evaluates &quot;</span>
+ <span class="s">&quot;to True [NOSE_EVAL_ATTR]&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">config</span><span class="p">):</span>
+ <span class="sd">&quot;&quot;&quot;Configure the plugin and system, based on selected options.</span>
+
+<span class="sd"> attr and eval_attr may each be lists.</span>
+
+<span class="sd"> self.attribs will be a list of lists of tuples. In that list, each</span>
+<span class="sd"> list is a group of attributes, all of which must match for the rule to</span>
+<span class="sd"> match.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span> <span class="o">=</span> <span class="p">[]</span>
+
+ <span class="c"># handle python eval-expression parameter</span>
+ <span class="k">if</span> <span class="n">compat_24</span> <span class="ow">and</span> <span class="n">options</span><span class="o">.</span><span class="n">eval_attr</span><span class="p">:</span>
+ <span class="n">eval_attr</span> <span class="o">=</span> <span class="n">tolist</span><span class="p">(</span><span class="n">options</span><span class="o">.</span><span class="n">eval_attr</span><span class="p">)</span>
+ <span class="k">for</span> <span class="n">attr</span> <span class="ow">in</span> <span class="n">eval_attr</span><span class="p">:</span>
+ <span class="c"># &quot;&lt;python expression&gt;&quot;</span>
+ <span class="c"># -&gt; eval(expr) in attribute context must be True</span>
+ <span class="k">def</span> <span class="nf">eval_in_context</span><span class="p">(</span><span class="n">expr</span><span class="p">,</span> <span class="n">attribs</span><span class="p">):</span>
+ <span class="k">return</span> <span class="nb">eval</span><span class="p">(</span><span class="n">expr</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">ContextHelper</span><span class="p">(</span><span class="n">attribs</span><span class="p">))</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span><span class="o">.</span><span class="n">append</span><span class="p">([(</span><span class="n">attr</span><span class="p">,</span> <span class="n">eval_in_context</span><span class="p">)])</span>
+
+ <span class="c"># attribute requirements are a comma separated list of</span>
+ <span class="c"># &#39;key=value&#39; pairs</span>
+ <span class="k">if</span> <span class="n">options</span><span class="o">.</span><span class="n">attr</span><span class="p">:</span>
+ <span class="n">std_attr</span> <span class="o">=</span> <span class="n">tolist</span><span class="p">(</span><span class="n">options</span><span class="o">.</span><span class="n">attr</span><span class="p">)</span>
+ <span class="k">for</span> <span class="n">attr</span> <span class="ow">in</span> <span class="n">std_attr</span><span class="p">:</span>
+ <span class="c"># all attributes within an attribute group must match</span>
+ <span class="n">attr_group</span> <span class="o">=</span> <span class="p">[]</span>
+ <span class="k">for</span> <span class="n">attrib</span> <span class="ow">in</span> <span class="n">attr</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&quot;,&quot;</span><span class="p">):</span>
+ <span class="c"># don&#39;t die on trailing comma</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">attrib</span><span class="p">:</span>
+ <span class="k">continue</span>
+ <span class="n">items</span> <span class="o">=</span> <span class="n">attrib</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&quot;=&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
+ <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">items</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
+ <span class="c"># &quot;name=value&quot;</span>
+ <span class="c"># -&gt; &#39;str(obj.name) == value&#39; must be True</span>
+ <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">items</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="n">key</span> <span class="o">=</span> <span class="n">items</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+ <span class="k">if</span> <span class="n">key</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">&quot;!&quot;</span><span class="p">:</span>
+ <span class="c"># &quot;!name&quot;</span>
+ <span class="c"># &#39;bool(obj.name)&#39; must be False</span>
+ <span class="n">key</span> <span class="o">=</span> <span class="n">key</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
+ <span class="n">value</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="c"># &quot;name&quot;</span>
+ <span class="c"># -&gt; &#39;bool(obj.name)&#39; must be True</span>
+ <span class="n">value</span> <span class="o">=</span> <span class="bp">True</span>
+ <span class="n">attr_group</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">))</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">attr_group</span><span class="p">)</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span><span class="p">:</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="k">def</span> <span class="nf">validateAttrib</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attribs</span><span class="p">):</span>
+ <span class="c"># TODO: is there a need for case-sensitive value comparison?</span>
+ <span class="c"># within each group, all must match for the group to match</span>
+ <span class="c"># if any group matches, then the attribute set as a whole</span>
+ <span class="c"># has matched</span>
+ <span class="n">any</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">for</span> <span class="n">group</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">attribs</span><span class="p">:</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">True</span>
+ <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
+ <span class="n">obj_value</span> <span class="o">=</span> <span class="n">attribs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
+ <span class="k">if</span> <span class="nb">callable</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">value</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">attribs</span><span class="p">):</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">break</span>
+ <span class="k">elif</span> <span class="n">value</span> <span class="ow">is</span> <span class="bp">True</span><span class="p">:</span>
+ <span class="c"># value must exist and be True</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="nb">bool</span><span class="p">(</span><span class="n">obj_value</span><span class="p">):</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">break</span>
+ <span class="k">elif</span> <span class="n">value</span> <span class="ow">is</span> <span class="bp">False</span><span class="p">:</span>
+ <span class="c"># value must not exist or be False</span>
+ <span class="k">if</span> <span class="nb">bool</span><span class="p">(</span><span class="n">obj_value</span><span class="p">):</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">break</span>
+ <span class="k">elif</span> <span class="nb">type</span><span class="p">(</span><span class="n">obj_value</span><span class="p">)</span> <span class="ow">in</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">):</span>
+ <span class="c"># value must be found in the list attribute</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">value</span> <span class="ow">in</span> <span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">obj_value</span><span class="p">]:</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">break</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="c"># value must match, convert to string and compare</span>
+ <span class="k">if</span> <span class="p">(</span><span class="n">value</span> <span class="o">!=</span> <span class="n">obj_value</span>
+ <span class="ow">and</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">!=</span> <span class="nb">str</span><span class="p">(</span><span class="n">obj_value</span><span class="p">)</span><span class="o">.</span><span class="n">lower</span><span class="p">()):</span>
+ <span class="n">match</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">break</span>
+ <span class="n">any</span> <span class="o">=</span> <span class="n">any</span> <span class="ow">or</span> <span class="n">match</span>
+ <span class="k">if</span> <span class="n">any</span><span class="p">:</span>
+ <span class="c"># not True because we don&#39;t want to FORCE the selection of the</span>
+ <span class="c"># item, only say that it is acceptable</span>
+ <span class="k">return</span> <span class="bp">None</span>
+ <span class="k">return</span> <span class="bp">False</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="sd">&quot;&quot;&quot;Accept the class if the class or any method is wanted.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="n">cls_attr</span> <span class="o">=</span> <span class="n">cls</span><span class="o">.</span><span class="n">__dict__</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">validateAttrib</span><span class="p">(</span><span class="n">cls_attr</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">False</span><span class="p">:</span>
+ <span class="k">return</span> <span class="bp">None</span>
+ <span class="c"># Methods in __dict__.values() are functions, oddly enough.</span>
+ <span class="n">methods</span> <span class="o">=</span> <span class="nb">filter</span><span class="p">(</span><span class="n">isfunction</span><span class="p">,</span> <span class="n">cls_attr</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
+ <span class="n">wanted</span> <span class="o">=</span> <span class="nb">filter</span><span class="p">(</span><span class="k">lambda</span> <span class="n">m</span><span class="p">:</span> <span class="n">m</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">False</span><span class="p">,</span>
+ <span class="nb">map</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">wantFunction</span><span class="p">,</span> <span class="n">methods</span><span class="p">))</span>
+ <span class="k">if</span> <span class="n">wanted</span><span class="p">:</span>
+ <span class="k">return</span> <span class="bp">None</span>
+ <span class="k">return</span> <span class="bp">False</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="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">validateAttrib</span><span class="p">(</span><span class="n">function</span><span class="o">.</span><span class="n">__dict__</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">wantMethod</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">method</span><span class="p">):</span>
+ <span class="n">attribs</span> <span class="o">=</span> <span class="n">AttributeGetter</span><span class="p">(</span><span class="n">method</span><span class="o">.</span><span class="n">im_class</span><span class="p">,</span> <span class="n">method</span><span class="p">)</span>
+ <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">validateAttrib</span><span class="p">(</span><span class="n">attribs</span><span class="p">)</span>
+</pre></div>
+
+
</div>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
View
102 doc/plugin_capture.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
@@ -24,7 +24,7 @@
<p>This plugin implements the following plugin interface methods:</p>
- <ul><li><a href="plugin_interface.html#afterTest">afterTest</a></li><li><a href="plugin_interface.html#beforeTest">beforeTest</a></li><li><a href="plugin_interface.html#begin">begin</a></li><li><a href="plugin_interface.html#configure">configure</a></li><li><a href="plugin_interface.html#formatError">formatError</a></li><li><a href="plugin_interface.html#formatFailure">formatFailure</a></li><li><a href="plugin_interface.html#options">options</a></li></ul>
+ <ul><li><a href="plugin_interface.html#afterTest">afterTest</a></li><li><a href="plugin_interface.html#beforeTest">beforeTest</a></li><li><a href="plugin_interface.html#begin">begin</a></li><li><a href="plugin_interface.html#configure">configure</a></li><li><a href="plugin_interface.html#finalize">finalize</a></li><li><a href="plugin_interface.html#formatError">formatError</a></li><li><a href="plugin_interface.html#formatFailure">formatFailure</a></li><li><a href="plugin_interface.html#options">options</a></li></ul>
<h2>Commandline Options</h2>
@@ -36,6 +36,102 @@
immediately) [NOSE_NOCAPTURE]
</pre>
+ <h2>Source</h2>
+
+ <div class="highlight"><pre><span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">This plugin captures stdout during test execution, appending any</span>
+<span class="sd">output captured to the error or failure output, should the test fail</span>
+<span class="sd">or raise an error. It is enabled by default but may be disable with</span>
+<span class="sd">the options -s or --nocapture.</span>
+<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">sys</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">ln</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>
+
+<span class="k">class</span> <span class="nc">Capture</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+ <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd"> Output capture plugin. Enabled by default. Disable with -s or</span>
+<span class="sd"> --nocapture. This plugin captures stdout during test execution,</span>
+<span class="sd"> appending any output captured to the error or failure output,</span>
+<span class="sd"> should the test fail or raise an error.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="n">enabled</span> <span class="o">=</span> <span class="bp">True</span>
+ <span class="n">env_opt</span> <span class="o">=</span> <span class="s">&#39;NOSE_NOCAPTURE&#39;</span>
+ <span class="n">name</span> <span class="o">=</span> <span class="s">&#39;capture&#39;</span>
+ <span class="n">score</span> <span class="o">=</span> <span class="mi">500</span>
+
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="p">[]</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span> <span class="o">=</span> <span class="bp">None</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">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span>
+ <span class="s">&quot;-s&quot;</span><span class="p">,</span> <span class="s">&quot;--nocapture&quot;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;store_false&quot;</span><span class="p">,</span>
+ <span class="n">default</span><span class="o">=</span><span class="ow">not</span> <span class="n">env</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env_opt</span><span class="p">),</span> <span class="n">dest</span><span class="o">=</span><span class="s">&quot;capture&quot;</span><span class="p">,</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Don&#39;t capture stdout (any stdout output &quot;</span>
+ <span class="s">&quot;will be printed immediately) [NOSE_NOCAPTURE]&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="bp">self</span><span class="o">.</span><span class="n">conf</span> <span class="o">=</span> <span class="n">conf</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">options</span><span class="o">.</span><span class="n">capture</span><span class="p">:</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">enabled</span> <span class="o">=</span> <span class="bp">False</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="bp">self</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span> <span class="o">=</span> <span class="bp">None</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="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c"># get an early handle on sys.stdout</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="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
+
+ <span class="k">def</span> <span class="nf">formatError</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="n">err</span><span class="p">):</span>
+ <span class="n">test</span><span class="o">.</span><span class="n">captured_output</span> <span class="o">=</span> <span class="n">output</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">buffer</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span> <span class="o">=</span> <span class="bp">None</span>
+ <span class="k">if</span> <span class="ow">not</span> <span class="n">output</span><span class="p">:</span>
+ <span class="k">return</span>
+ <span class="n">ec</span><span class="p">,</span> <span class="n">ev</span><span class="p">,</span> <span class="n">tb</span> <span class="o">=</span> <span class="n">err</span>
+ <span class="k">return</span> <span class="p">(</span><span class="n">ec</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">addCaptureToErr</span><span class="p">(</span><span class="n">ev</span><span class="p">,</span> <span class="n">output</span><span class="p">),</span> <span class="n">tb</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">formatFailure</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="n">err</span><span class="p">):</span>
+ <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">formatError</span><span class="p">(</span><span class="n">test</span><span class="p">,</span> <span class="n">err</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">addCaptureToErr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ev</span><span class="p">,</span> <span class="n">output</span><span class="p">):</span>
+ <span class="k">return</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">str</span><span class="p">(</span><span class="n">ev</span><span class="p">)</span> <span class="p">,</span> <span class="n">ln</span><span class="p">(</span><span class="s">&#39;&gt;&gt; begin captured stdout &lt;&lt;&#39;</span><span class="p">),</span>
+ <span class="n">output</span><span class="p">,</span> <span class="n">ln</span><span class="p">(</span><span class="s">&#39;&gt;&gt; end captured stdout &lt;&lt;&#39;</span><span class="p">)])</span>
+
+ <span class="k">def</span> <span class="nf">start</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
+ <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span>
+
+ <span class="k">def</span> <span class="nf">end</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">stdout</span><span class="p">:</span>
+ <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">pop</span><span class="p">()</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">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">stdout</span><span class="p">:</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+
+ <span class="k">def</span> <span class="nf">_get_buffer</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span>
+ <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_buf</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
+
+ <span class="nb">buffer</span> <span class="o">=</span> <span class="nb">property</span><span class="p">(</span><span class="n">_get_buffer</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="sd">&quot;&quot;&quot;Captured stdout output.&quot;&quot;&quot;</span><span class="p">)</span>
+</pre></div>
+
+
</div>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
View
150 doc/plugin_cover.html
@@ -6,8 +6,8 @@
<body>
<div id="menu">
- <p>This document covers nose version <b>0.10.0a2</b></p>
- <p>Last update: <b>Thu Jul 19 16:16:28 2007</b></p>
+ <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>
@@ -62,6 +62,152 @@
suite. [NOSE_COVER_INCLUSIVE]
</pre>
+ <h2>Source</h2>
+
+ <div class="highlight"><pre><span class="sd">&quot;&quot;&quot;If you have Ned Batchelder&#39;s coverage_ module installed, you may activate a</span>
+<span class="sd">coverage report with the --with-coverage switch or NOSE_WITH_COVERAGE</span>
+<span class="sd">environment variable. The coverage report will cover any python source module</span>
+<span class="sd">imported after the start of the test run, excluding modules that match</span>
+<span class="sd">testMatch. If you want to include those modules too, use the --cover-tests</span>
+<span class="sd">switch, or set the NOSE_COVER_TESTS environment variable to a true value. To</span>
+<span class="sd">restrict the coverage report to modules from a particular package or packages,</span>
+<span class="sd">use the --cover-packages switch or the NOSE_COVER_PACKAGES environment</span>
+<span class="sd">variable.</span>
+
+<span class="sd">.. _coverage: http://www.nedbatchelder.com/code/modules/coverage.html</span>
+<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">sys</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">tolist</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>
+
+<span class="k">class</span> <span class="nc">Coverage</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
+ <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd"> If you have Ned Batchelder&#39;s coverage module installed, you may</span>
+<span class="sd"> activate a coverage report. The coverage report will cover any</span>
+<span class="sd"> python source module imported after the start of the test run, excluding</span>
+<span class="sd"> modules that match testMatch. If you want to include those modules too,</span>
+<span class="sd"> use the --cover-tests switch, or set the NOSE_COVER_TESTS environment</span>
+<span class="sd"> variable to a true value. To restrict the coverage report to modules from</span>
+<span class="sd"> a particular package or packages, use the --cover-packages switch or the</span>
+<span class="sd"> NOSE_COVER_PACKAGES environment variable.</span>
+<span class="sd"> &quot;&quot;&quot;</span>
+ <span class="n">coverTests</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="n">coverPackages</span> <span class="o">=</span> <span class="bp">None</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">&quot;--cover-package&quot;</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">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_COVER_PACKAGE&#39;</span><span class="p">),</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;cover_packages&quot;</span><span class="p">,</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Restrict coverage output to selected packages &quot;</span>
+ <span class="s">&quot;[NOSE_COVER_PACKAGE]&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">&quot;--cover-erase&quot;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;store_true&quot;</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_COVER_ERASE&#39;</span><span class="p">),</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;cover_erase&quot;</span><span class="p">,</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Erase previously collected coverage &quot;</span>
+ <span class="s">&quot;statistics before run&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">&quot;--cover-tests&quot;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;store_true&quot;</span><span class="p">,</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;cover_tests&quot;</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_COVER_TESTS&#39;</span><span class="p">),</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Include test modules in coverage report &quot;</span>
+ <span class="s">&quot;[NOSE_COVER_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">&quot;--cover-inclusive&quot;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;store_true&quot;</span><span class="p">,</span>
+ <span class="n">dest</span><span class="o">=</span><span class="s">&quot;cover_inclusive&quot;</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_COVER_INCLUSIVE&#39;</span><span class="p">),</span>
+ <span class="n">help</span><span class="o">=</span><span class="s">&quot;Include all python files under working &quot;</span>
+ <span class="s">&quot;directory in coverage report. Useful for &quot;</span>
+ <span class="s">&quot;discovering holes in test coverage if not all &quot;</span>
+ <span class="s">&quot;files are imported by the test suite. &quot;</span>
+ <span class="s">&quot;[NOSE_COVER_INCLUSIVE]&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">config</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">config</span><span class="p">)</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">enabled</span><span class="p">:</