[Python-modules-commits] [nose2] 01/06: Import nose2_0.6.0.orig.tar.gz
Brian May
bam at moszumanska.debian.org
Tue Feb 23 06:00:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository nose2.
commit 5d7fc2e9f3985c66a168e439ccf75fdc47cf2ff2
Author: Brian May <bam at debian.org>
Date: Tue Feb 23 16:21:02 2016 +1100
Import nose2_0.6.0.orig.tar.gz
---
MANIFEST.in | 2 +-
PKG-INFO | 10 +-
README.rst | 4 +-
docs/Makefile | 130 +++++++++++++++++++++
docs/configuration.rst | 2 +-
docs/dev/documenting_plugins.rst | 6 +-
docs/dev/hook_reference.rst | 66 +++++------
docs/dev/plugin_class_reference.rst | 2 +-
docs/dev/writing_plugins.rst | 4 +-
docs/differences.rst | 10 +-
docs/plugins/attrib.rst | 8 +-
docs/plugins/eggdiscovery.rst | 6 +-
docs/plugins/layers.rst | 18 +--
docs/plugins/mp.rst | 18 +--
docs/such_dsl.rst | 10 +-
docs/usage.rst | 6 +-
nose2.egg-info/PKG-INFO | 10 +-
nose2.egg-info/SOURCES.txt | 14 +++
nose2.egg-info/entry_points.txt | 2 +-
nose2.egg-info/requires.txt | 4 +-
nose2/collector.py | 7 +-
nose2/compat.py | 6 +-
nose2/config.py | 4 +-
nose2/events.py | 68 +++++++----
nose2/exceptions.py | 2 +-
nose2/loader.py | 10 +-
nose2/main.py | 32 ++---
nose2/plugins/attrib.py | 2 +-
nose2/plugins/collect.py | 8 +-
nose2/plugins/coverage.py | 18 ++-
nose2/plugins/debugger.py | 2 +-
nose2/plugins/doctests.py | 3 +-
nose2/plugins/dundertest.py | 7 +-
nose2/plugins/junitxml.py | 46 ++++++--
nose2/plugins/loader/discovery.py | 8 +-
nose2/plugins/loader/eggdiscovery.py | 4 +-
nose2/plugins/loader/generators.py | 7 +-
nose2/plugins/loader/loadtests.py | 18 +--
nose2/plugins/loader/parameters.py | 2 +-
nose2/plugins/loader/testclasses.py | 8 +-
nose2/plugins/mp.py | 14 +--
nose2/plugins/printhooks.py | 4 +-
nose2/plugins/result.py | 8 +-
nose2/result.py | 12 +-
nose2/runner.py | 2 +-
nose2/session.py | 2 +-
nose2/sphinxext.py | 2 +-
nose2/suite.py | 12 +-
nose2/tests/_common.py | 14 +--
.../functional/support/scenario/doctests/docs.py | 4 +
.../functional/support/scenario/doctests/docs.txt | 4 +
.../scenario/doctests/doctests_pkg1/__init__.py | 0
.../scenario/doctests/doctests_pkg1/docs1.py | 4 +
.../scenario/doctests/doctests_pkg1/docs1.txt | 4 +
.../test_junitxml_empty_properties.py | 7 ++
.../junitxml/empty_properties/unittest.cfg | 4 +
.../test_junitxml_missing_properties.py | 7 ++
.../junitxml/missing_properties/unittest.cfg | 4 +
.../test_junitxml_with_properties.py | 7 ++
.../scenario/junitxml/with_properties/unittest.cfg | 4 +
nose2/tests/functional/test_coverage.py | 9 +-
nose2/tests/functional/test_doctests_plugin.py | 60 ++++++++++
nose2/tests/functional/test_junitxml_plugin.py | 73 +++++++++++-
nose2/tests/functional/test_loading.py | 16 +++
nose2/tests/functional/test_loadtests_plugin.py | 11 ++
nose2/tests/functional/test_util.py | 6 +-
nose2/tests/unit/test_collector.py | 21 ++++
nose2/tests/unit/test_loader.py | 15 +++
nose2/tests/unit/test_util.py | 16 +++
nose2/tools/decorators.py | 4 +-
nose2/tools/params.py | 8 +-
nose2/tools/such.py | 39 +++----
nose2/util.py | 46 +++++---
requirements-py26.txt | 1 +
setup.py | 2 +-
75 files changed, 769 insertions(+), 271 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index ed39a77..f4337dc 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -7,7 +7,7 @@ include unittest.cfg
include README.rst
include license.txt
recursive-include nose2/tests/functional/support *.py *.txt *.cfg
-recursive-include docs *.inc *.py *.rst
+recursive-include docs *.inc *.py *.rst Makefile
graft bin
global-exclude __pycache__
global-exclude *~
diff --git a/PKG-INFO b/PKG-INFO
index 797c1ca..dbce22d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,14 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: nose2
-Version: 0.5.0
+Version: 0.6.0
Summary: nose2 is the next generation of nicer testing for Python
Home-page: https://github.com/nose-devs/nose2
Author: Jason Pellerin
Author-email: jpellerin+nose at gmail.com
License: UNKNOWN
-Description: .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
+Description: *Looking for maintainers. See https://github.com/nose-devs/nose2/issues/261*
+
+ .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
:target: https://travis-ci.org/nose-devs/nose2
:alt: Build Status
@@ -40,7 +42,7 @@ Description: .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
* being easier for users to configure
* simplifying internal interfaces and processes
* supporting Python 2 and 3 from the same codebase, without translation
- * encourging greater community involvement in its development
+ * encouraging greater community involvement in its development
In service of some those goals, some features of nose *will not* be
supported in nose2. See `differences`_ for a thorough rundown.
diff --git a/README.rst b/README.rst
index 511a435..e30055d 100644
--- a/README.rst
+++ b/README.rst
@@ -1,3 +1,5 @@
+*Looking for maintainers. See https://github.com/nose-devs/nose2/issues/261*
+
.. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
:target: https://travis-ci.org/nose-devs/nose2
:alt: Build Status
@@ -32,7 +34,7 @@ on the plugins branch of unittest2. nose2 aims to improve on nose by:
* being easier for users to configure
* simplifying internal interfaces and processes
* supporting Python 2 and 3 from the same codebase, without translation
- * encourging greater community involvement in its development
+ * encouraging greater community involvement in its development
In service of some those goals, some features of nose *will not* be
supported in nose2. See `differences`_ for a thorough rundown.
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..53a85d9
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nose2.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nose2.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/nose2"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nose2"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/configuration.rst b/docs/configuration.rst
index 48b87b8..9e87da0 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -36,7 +36,7 @@ discovery:
.. rst:configvar :: start-dir
This option configures the default directory to start discovery.
- The default value is "." (the current directory where nose2
+ The default value is ``"."`` (the current directory where nose2
is executed). This directory is where nose2 will start looking for
tests.
diff --git a/docs/dev/documenting_plugins.rst b/docs/dev/documenting_plugins.rst
index d2bcfcb..e14252c 100644
--- a/docs/dev/documenting_plugins.rst
+++ b/docs/dev/documenting_plugins.rst
@@ -9,10 +9,10 @@ One easy way to document your plugins is to use nose2's `Sphinx`_
extension, which provides an ``autoplugin`` directive that will
produce decent reference documentation from your plugin classes.
-To use it, add 'nose2.sphinxext' to the ``extensions`` list in the
+To use it, add ``nose2.sphinxext`` to the ``extensions`` list in the
``conf.py`` file in your docs directory.
-Then add an ``autoplugin`` directive to an rst file, like this::
+Then add an ``autoplugin`` directive to a ``*.rst`` file, like this::
.. autoplugin :: mypackage.plugins.PluginClass
@@ -27,7 +27,7 @@ docstring for users to read.
Of course you can, and should, write some words before the reference
docs explaining what your plugin does and how to use it. You can put
-those words in the rst file itself, or in the docstring of the module
+those words in the ``*.rst`` file itself, or in the docstring of the module
where your plugin lives.
.. _Sphinx : http://sphinx.pocoo.org/
diff --git a/docs/dev/hook_reference.rst b/docs/dev/hook_reference.rst
index b7f2f41..7121ef0 100644
--- a/docs/dev/hook_reference.rst
+++ b/docs/dev/hook_reference.rst
@@ -15,7 +15,7 @@ Pre-registration Hooks
The ``pluginsLoaded`` hook is called after all config files have been read,
and all plugin classes loaded. Plugins that register automatically
- (those that call :meth:`nose2.events.Plugin.register` in __init__
+ (those that call :meth:`nose2.events.Plugin.register` in ``__init__``
or have ``always-on = True`` set in their config file sections) will
have already been registered with the hooks they implement. Plugins
waiting for command-line activation will not yet be registered.
@@ -68,7 +68,7 @@ These hooks are called for registered plugins only.
:param event: A :class:`nose2.events.LoadFromNamesEvent` instance
Plugins can return a test suite or list of test suites and set
- ``event.handled`` to True to prevent other plugins from loading
+ ``event.handled`` to ``True`` to prevent other plugins from loading
tests from the given names, or append tests to
``event.extraTests``. Plugins can also remove names from
``event.names`` to prevent other plugins from acting on those
@@ -78,7 +78,7 @@ These hooks are called for registered plugins only.
:param event: A :class:`nose2.events.LoadFromNameEvent` instance
- Plugins can return a test suite and set ``event.handled`` to True
+ Plugins can return a test suite and set ``event.handled`` to ``True``
to prevent other plugins from loading tests from the given name,
or append tests to ``event.extraTests``.
@@ -87,7 +87,7 @@ These hooks are called for registered plugins only.
:param event: A :class:`nose2.events.HandleFileEvent` instance
Plugins can use this hook to load tests from files that are not
- python modules. Plugins may either append tests to ``event.extraTest``,
+ Python modules. Plugins may either append tests to ``event.extraTest``,
or, if they want to prevent other plugins from processing the file,
set ``event.handled`` to True and return a test case or test suite.
@@ -97,9 +97,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to prevent python modules from being
loaded by the test loader or force them to be loaded by the test
- loader. Set ``event.handled`` to True and return False to cause the
- loader to skip the module. Set ``event.handled`` to True and return
- True to cause the loader to load the module.
+ loader. Set ``event.handled`` to ``True`` and return ``False`` to cause the
+ loader to skip the module. Set ``event.handled`` to ``True`` and return
+ ``True`` to cause the loader to load the module.
.. function :: loadTestsFromModule(self, event)
@@ -121,7 +121,7 @@ These hooks are called for registered plugins only.
Plugins can use this hook to load tests from a
:class:`unittest.TestCase`. To prevent other plugins from loading
- tests from the test case, set ``event.handled`` to True and return
+ tests from the test case, set ``event.handled`` to ``True`` and return
a test suite. Plugins can also append tests to ``event.extraTests``
-- usually that's what you want to do, since that will allow other
plugins to load their tests from the test case as well.
@@ -134,7 +134,7 @@ These hooks are called for registered plugins only.
names that will be loaded from a :class:`unittest.TestCase` by the
standard nose2 test loader plugins (and other plugins that respect
the results of the hook). To force a specific list of names, set
- ``event.handled`` to True and return a list: this exact list will
+ ``event.handled`` to ``True`` and return a list: this exact list will
be the only test case names loaded from the test case. Plugins can
also extend the list of names by appending test names to
``event.extraNames``, and exclude names by appending test names to
@@ -164,7 +164,7 @@ These hooks are called for registered plugins only.
takes two arguments: the top-level test and the test result.
To prevent the test executor from running at all, set
- ``event.handled`` to True.
+ ``event.handled`` to ``True``.
.. function :: startTest(self, event)
@@ -179,9 +179,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to produce output for the user at the
start of a test. If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting
- to the user, set ``event.handled`` to True.
+ to the user, set ``event.handled`` to ``True``.
.. function :: describeTest(self, event)
@@ -215,9 +215,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report test success to the user. If
you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportError(self, event)
@@ -225,9 +225,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report a test error to the user. If
you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportFailure(self, event)
@@ -235,9 +235,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report test failure to the user. If
you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportSkip(self, event)
@@ -245,9 +245,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report a skipped test to the user. If
you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportExpectedFailure(self, event)
@@ -255,9 +255,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report an expected failure to the
user. If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportUnexpectedSuccess(self, event)
@@ -265,9 +265,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report an unexpected success to the
user. If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: reportOtherOutcome(self, event)
@@ -275,9 +275,9 @@ These hooks are called for registered plugins only.
Plugins can use this hook to report a custom test outcome to the
user. If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console. To prevent other plugins from reporting to
- the user, set ``event.handled`` to True.
+ the user, set ``event.handled`` to ``True``.
.. function :: stopTest(self, event)
@@ -312,7 +312,7 @@ These hooks are called for registered plugins only.
a test run. This hook fires when something calls
:meth:`nose2.result.PluggableTestResult.stop`. If you want to
prevent this from stopping the test run, set ``event.shouldStop``
- to False.
+ to ``False``.
.. function :: beforeErrorList(self, event)
@@ -321,10 +321,10 @@ These hooks are called for registered plugins only.
Plugins can use this hook to output or modify summary information
before the list of errors and failures is output. To modify the
categories of outcomes that will be reported, plugins can modify
- the ``event.reportCategories`` dictionary. Plugins can set, wrap or
+ the ``event.reportCategories`` dictionary. Plugins can set, wrap, or
capture the output stream by reading or setting ``event.stream``.
If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console.
.. function :: outcomeDetail(self, event)
@@ -346,7 +346,7 @@ These hooks are called for registered plugins only.
the ``event.reportCategories`` dictionary. Plugins can set, wrap or
capture the output stream by reading or setting
``event.stream``. If you want to print to the console, write to
- ``event.stream``. Remember to respect self.session.verbosity when
+ ``event.stream``. Remember to respect ``self.session.verbosity`` when
printing to the console.
.. function :: wasSuccessful(self, event)
@@ -356,7 +356,7 @@ These hooks are called for registered plugins only.
Plugins can use this hook to mark a test run as successful or
unsuccessful. If not plugin marks the run as successful, the
default state is failure. To mark a run as successful, set
- ``event.success`` to True. Be ware that other plugins may set this
+ ``event.success`` to ``True``. Be ware that other plugins may set this
attribute as well!
.. function :: afterSummaryReport(self, event)
@@ -365,7 +365,7 @@ These hooks are called for registered plugins only.
Plugins can use this hook to output a report to the user after the
summary line is output. If you want to print to the console, write
- to ``event.stream``. Remember to respect self.session.verbosity
+ to ``event.stream``. Remember to respect ``self.session.verbosity``
when printing to the console.
@@ -380,7 +380,7 @@ These hooks are called when plugins want to interact with the user.
Plugins should respond to this hook by getting out of the way of
user interaction, if the need to, or setting ``event.handled`` and
- returning False, if they need to but can't.
+ returning ``False``, if they need to but can't.
.. function :: afterInteraction(event)
diff --git a/docs/dev/plugin_class_reference.rst b/docs/dev/plugin_class_reference.rst
index c2768d0..60e67be 100644
--- a/docs/dev/plugin_class_reference.rst
+++ b/docs/dev/plugin_class_reference.rst
@@ -2,7 +2,7 @@ Plugin class reference
======================
The plugin system in nose2 is based on the plugin system in
-unittest2's plugins branch.
+unittest2's ``plugins`` branch.
Plugin base class
diff --git a/docs/dev/writing_plugins.rst b/docs/dev/writing_plugins.rst
index fca1bbc..2abf894 100644
--- a/docs/dev/writing_plugins.rst
+++ b/docs/dev/writing_plugins.rst
@@ -113,11 +113,11 @@ Guidelines
Events
------
-nose2's plugin api is based on the api in unittest2's
-under-development plugins branch. It differs from nose's plugins api
in one major area: what it passes to hooks. Where nose passes a
variety of arguments, nose2 *always passes an event*. The events are
listed in the :doc:`event_reference`.
+nose2's plugin API is based on the API in unittest2's
+``plugins`` branch (under-development). Its differs from nose's
Here's the key thing about that: *event attributes are
read-write*. Unless stated otherwise in the documentation for a hook,
diff --git a/docs/differences.rst b/docs/differences.rst
index 0a87edc..490acf7 100644
--- a/docs/differences.rst
+++ b/docs/differences.rst
@@ -93,7 +93,7 @@ with a custom test runner, when run this way, *nose2 essentially
hijacks the test running process*. The "test suite" that
:func:`nose2.collector.collector` returns actually *is* a test runner,
cloaked inside of a test case. It loads and runs tests as normal,
-setting up its own test runner and test result, and calls sys.exit()
+setting up its own test runner and test result, and calls ``sys.exit()``
itself -- completely bypassing the test runner and test result that
setuptools/unittest create. This may be incompatible with some
projects.
@@ -102,7 +102,7 @@ New Plugin API
^^^^^^^^^^^^^^
nose2 implements a new plugin API based on the work done by Michael
-Foord in unittest2's plugins branch. This API is greatly superior to
+Foord in unittest2's ``plugins`` branch. This API is greatly superior to
the one in nose, especially in how it allows plugins to interact with
each other. But it is different enough from the API in nose that
supporting nose plugins in nose2 will not be practical: *plugins must
@@ -122,8 +122,8 @@ Internals
nose wraps or replaces everything in unittest. nose2 does a bit less:
*it does not wrap TestCases*, and does not wrap the test result class
-with a result proxy. nose2 does subclass TestProgram, and install its
-own loader, runner and result classes. It does this unconditionally,
+with a result proxy. nose2 does subclass :class:`TestProgram`, and install its
+own loader, runner, and result classes. It does this unconditionally,
rather than allowing arguments to ``TestProgram.__init__()`` to specify
the test loader and runner. See :doc:`dev/internals` for more
information.
@@ -154,7 +154,7 @@ nose2 is being developed by the same people who maintain nose.
nose2 is not (exactly) unittest2/plugins
----------------------------------------
-nose2 is based on the unittest2 plugins branch, but differs from it in
+nose2 is based on the unittest2 ``plugins`` branch, but differs from it in
several substantial ways. The *event api not exactly the same* because
nose2 can't replace unittest.TestCase, and *does not configure the test
run or plugin set globally*. nose2 also has a *wholly different
diff --git a/docs/plugins/attrib.rst b/docs/plugins/attrib.rst
index 9388b0e..48a37c2 100644
--- a/docs/plugins/attrib.rst
+++ b/docs/plugins/attrib.rst
@@ -42,7 +42,7 @@ Runs these tests::
test_fast (attrib_example.Test) ... ok
test_faster (attrib_example.Test) ... ok
-This selects all tests that define the attribute as any True value.
+This selects all tests that define the attribute as any ``True`` value.
Select tests that do not have an attribute
@@ -57,7 +57,7 @@ Runs these tests::
test_slow (attrib_example.Test) ... ok
test_slower (attrib_example.Test) ... ok
-This selects all tests that define the attribute as a False value,
+This selects all tests that define the attribute as a ``False`` value,
*and those tests that do not have the attribute at all*.
@@ -108,7 +108,7 @@ Runs these tests::
test_fast (attrib_example.Test) ... ok
The result in this case can be somewhat counter-intuitive. What the
-attrib plugin selects when you negate an attribute that is in a list
+``attrib`` plugin selects when you negate an attribute that is in a list
are only those tests that *have the list attribute* but *without the
value* specified. Tests that do not have the attribute at all are
*not* selected.
@@ -120,7 +120,7 @@ Select tests using Python expressions
For more complex cases, you can use the :option:`-E` command-line
option to pass a Python expression that will be evaluated in the
context of each test case. Only those test cases where the expression
-evaluates to True (and doesn't raise an exception) will be selected.
+evaluates to ``True`` (and don't raise an exception) will be selected.
Running nose2 like this::
diff --git a/docs/plugins/eggdiscovery.rst b/docs/plugins/eggdiscovery.rst
index 995ce55..1182f0d 100644
--- a/docs/plugins/eggdiscovery.rst
+++ b/docs/plugins/eggdiscovery.rst
@@ -7,12 +7,12 @@ What is Egg Discovery
---------------------
Sometimes Python Eggs are marked as zip-safe and they can be installed zipped,
-instead of unzipped in a .egg folder. See http://peak.telecommunity.com/DevCenter/PythonEggs for more details.
-The normal nose2.plugins.loader.discovery plugin ignores modules located inside zip files.
+instead of unzipped in an ``.egg`` folder. See http://peak.telecommunity.com/DevCenter/PythonEggs for more details.
+The normal ``nose2.plugins.loader.discovery`` plugin ignores modules located inside zip files.
The Egg Discovery plugin allows nose2 to discover tests within these zipped egg files.
-This plugin requires pkg_resources (from setuptools) to work correctly.
+This plugin requires ``pkg_resources`` (from ``setuptools``) to work correctly.
Usage
diff --git a/docs/plugins/layers.rst b/docs/plugins/layers.rst
index ede3b58..0f5900b 100644
--- a/docs/plugins/layers.rst
+++ b/docs/plugins/layers.rst
@@ -65,13 +65,13 @@ the base layer. For example for this test case::
The ``setUp`` methods from *both* ``SubLayer`` and ``Layer`` will run
before any tests are run. The superclass's setup will always run
-before the subclass's setup. For teardown, the reverse: the subclass's
-teardown runs before the superclass's.
+before the subclass's setup. For ``teardown``, the reverse: the subclass's
+``teardown`` runs before the superclass's.
.. warning ::
One important thing to note: layers that subclass other layers *must
- not* call their superclass's ``setUp``, ``tearDown``, etc. -- the test
+ not* call their superclass's ``setUp``, ``tearDown``, etc. The test
runner will take care of organizing tests so that the superclass's
methods are called in the right order::
@@ -184,10 +184,10 @@ Will instead look like this::
OK
The layer reporter plugin can also optionally colorize the keywords
-('A', 'having', and 'should' by default) in output from tests defined
+(by default, 'A', 'having', and 'should') in output from tests defined
with the :doc:`such DSL <../such_dsl>`.
-If you would like to change how the layer is displayed you need to set the description attribute.
+If you would like to change how the layer is displayed, set the ``description`` attribute.
.. code-block :: python
@@ -234,16 +234,16 @@ from one module executing interleaved with tests from a different
module.
-Mixing layers with setUpClass and module fixtures
+Mixing layers with ``setUpClass`` and module fixtures
-------------------------------------------------
**Don't cross the streams.**
The implementation of class- and module-level fixtures in unittest2
depends on introspecting the class hierarchy inside of the
-unittest.TestSuite. Since the suites that the layers plugin uses to
-organize tests derive from :class:`unittest.BaseTestSuite` not
-:class:`unittest.TestSuite`, class- and module- level fixtures in
+``unittest.TestSuite``. Since the suites that the ``layers`` plugin uses to
+organize tests derive from :class:`unittest.BaseTestSuite` (instead of
+:class:`unittest.TestSuite`), class- and module- level fixtures in
TestCase classes that use layers will be ignored.
Mixing layers and multiprocess testing
diff --git a/docs/plugins/mp.rst b/docs/plugins/mp.rst
index 1624f0c..ef09523 100644
--- a/docs/plugins/mp.rst
+++ b/docs/plugins/mp.rst
@@ -60,7 +60,7 @@ will bind to any random open port on ``127.1.2.3``. Any internet
address or host-name which python can recognize as such, bind, *and*
connect is acceptable. While ``0.0.0.0`` can be use for listening,
it is not necessarily an address to which the OS can connect. When
-the port address is 0 or omitted, a random open port is used. If
+the port address is ``0`` or omitted, a random open port is used. If
the setting is omitted or or blank, then sockets are not used unless
nose is being executed on Windows. In which case, an address on
the loop back interface and a random port are used. Whenever used,
@@ -78,10 +78,12 @@ Overhead Cost
~~~~~~~~~~~~~
Starting subprocesses and dispatching tests takes time. A test run
-that includes a relatively small number of tests that are not IO or
-CPU bound (or calling time.sleep()) is likely to be *slower* when run
-in parallel. As of this writing, for instance, nose2's test suite
-takes about 10 times as long to run when using multiprocessing, due to
+that includes a relatively small number of tests that are not I/O or
+CPU bound (or calling ``time.sleep()``) is likely to be *slower* when run
+in parallel.
+
+As of this writing, for instance, nose2's test suite
+takes about 10 times as long to run when using ``multiprocessing``, due to
the overhead cost.
Shared Fixtures
@@ -125,7 +127,7 @@ tests or care about something that happens *during* test execution.
New Methods
~~~~~~~~~~~
-The MultiProcess plugin adds a few plugin hooks that other plugins can
+The ``MultiProcess`` plugin adds a few plugin hooks that other plugins can
use to set themselves up for multiprocess test runs. Plugins don't
have to do anything special to register for these hooks, just
implement the methods as normal.
@@ -175,7 +177,7 @@ implement the methods as normal.
New Events
~~~~~~~~~~
-The MultiProcess plugin's new hooks come with custom event classes.
+The ``MultiProcess`` plugin's new hooks come with custom event classes.
.. autoclass :: nose2.plugins.mp.RegisterInSubprocessEvent
:members:
@@ -246,7 +248,7 @@ Interacting with Users
* You are probably safe because as a responsible plugin author you are
already firing the interaction hooks (:func:`beforeInteraction`,
:func:`afterInteraction`) around your interactive bits, and skipping
- them when the :func:`beforeInteraction` hook returns false and sets
+ them when the :func:`beforeInteraction` hook returns ``False`` and sets
``event.handled``.
If you're not doing that, start!
diff --git a/docs/such_dsl.rst b/docs/such_dsl.rst
index 35f7264..7c244c1 100644
--- a/docs/such_dsl.rst
+++ b/docs/such_dsl.rst
@@ -77,7 +77,7 @@ And tests are likewise marked with the ``should`` decorator:
Test cases may optionally take one argument. If they do, they will be
passed the :class:`unittest.TestCase` instance generated for the
-test. They can use this TestCase instance to execute assert methods,
+test. They can use this ``TestCase`` instance to execute assert methods,
among other things. Test functions can also call assert methods on the
top-level scenario instance, if they don't take the ``case`` argument:
@@ -115,10 +115,10 @@ are defined.
Otherwise, tests written in the such DSL are collected and run just like any
other tests, with one exception: their names. The name of a such test
case is the name of its immediately surrounding group, plus the
-description of the test, prepended with ``test ####:``, where '####'
-is the test's (0-indexed) position within its group. To run a case
-individually, you must pass in this full name -- usually you'll have
-to quote it. For example, to run the case ``should do more things``
+description of the test, prepended with ``test ####:``, where ``####``
+is the test's (``0`` -indexed) position within its group.
+
+To run a case individually, you must pass in this full name -- usually you'll have to quote it. For example, to run the case ``should do more things``
defined above (assuming the layers plugin is activated by a config
file, and the test module is in the normal path of test collection),
you would run nose2 like this::
diff --git a/docs/usage.rst b/docs/usage.rst
index cca4e58..a8539ca 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -14,9 +14,9 @@ for ways to modify searching for tests.
Directories nose2 will look in:
-* Directory that contains an __init__.py file (a Python package)
+* Directory that contains an ``__init__.py`` file (a Python package)
* Directory name that contains "test" after being lowercased.
-* Directory name that is either "lib" or "src"
+* Directory name that is either ``lib`` or ``src``
Each of the following test files will be run::
@@ -72,7 +72,7 @@ importable directory of the project, use the :option:`-s` and
Top-level directory of the project. Defaults to the starting
directory. This is the directory containing importable modules and
- packages, and is always prepended to sys.path before test discovery
+ packages, and is always prepended to ``sys.path`` before test discovery
begins.
Specifying Tests to Run
diff --git a/nose2.egg-info/PKG-INFO b/nose2.egg-info/PKG-INFO
index 797c1ca..dbce22d 100644
--- a/nose2.egg-info/PKG-INFO
+++ b/nose2.egg-info/PKG-INFO
@@ -1,12 +1,14 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: nose2
-Version: 0.5.0
+Version: 0.6.0
Summary: nose2 is the next generation of nicer testing for Python
Home-page: https://github.com/nose-devs/nose2
Author: Jason Pellerin
Author-email: jpellerin+nose at gmail.com
License: UNKNOWN
-Description: .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
+Description: *Looking for maintainers. See https://github.com/nose-devs/nose2/issues/261*
+
+ .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
:target: https://travis-ci.org/nose-devs/nose2
:alt: Build Status
@@ -40,7 +42,7 @@ Description: .. image:: https://travis-ci.org/nose-devs/nose2.png?branch=master
* being easier for users to configure
* simplifying internal interfaces and processes
* supporting Python 2 and 3 from the same codebase, without translation
- * encourging greater community involvement in its development
+ * encouraging greater community involvement in its development
In service of some those goals, some features of nose *will not* be
supported in nose2. See `differences`_ for a thorough rundown.
diff --git a/nose2.egg-info/SOURCES.txt b/nose2.egg-info/SOURCES.txt
index d562842..842280d 100644
--- a/nose2.egg-info/SOURCES.txt
+++ b/nose2.egg-info/SOURCES.txt
@@ -9,6 +9,7 @@ setup.py
tox.ini
unittest.cfg
bin/nose2
+docs/Makefile
docs/changelog.rst
docs/conf.py
docs/configuration.rst
@@ -121,6 +122,7 @@ nose2/tests/functional/test_collect_plugin.py
nose2/tests/functional/test_coverage.py
nose2/tests/functional/test_decorators.py
nose2/tests/functional/test_discovery_loader.py
+nose2/tests/functional/test_doctests_plugin.py
nose2/tests/functional/test_dundertest_plugin.py
nose2/tests/functional/test_eggdiscovery_loader.py
nose2/tests/functional/test_junitxml_plugin.py
@@ -141,12 +143,23 @@ nose2/tests/functional/support/scenario/class_fixtures/test_cf_testcase.py
nose2/tests/functional/support/scenario/colliding_test_modules/tests/test.py
nose2/tests/functional/support/scenario/colliding_test_modules/tests/more_tests/test.py
nose2/tests/functional/support/scenario/decorators/test_decorators.py
+nose2/tests/functional/support/scenario/doctests/docs.py
+nose2/tests/functional/support/scenario/doctests/docs.txt
+nose2/tests/functional/support/scenario/doctests/doctests_pkg1/__init__.py
+nose2/tests/functional/support/scenario/doctests/doctests_pkg1/docs1.py
+nose2/tests/functional/support/scenario/doctests/doctests_pkg1/docs1.txt
nose2/tests/functional/support/scenario/dundertest_attribute/test.py
nose2/tests/functional/support/scenario/expected_failures/expected_failures.py
nose2/tests/functional/support/scenario/junitxml/chdir/test_junitxml_chdir.py
+nose2/tests/functional/support/scenario/junitxml/empty_properties/test_junitxml_empty_properties.py
+nose2/tests/functional/support/scenario/junitxml/empty_properties/unittest.cfg
nose2/tests/functional/support/scenario/junitxml/fail_to_write/test_junitxml_fail_to_write.py
nose2/tests/functional/support/scenario/junitxml/fail_to_write/unittest.cfg
nose2/tests/functional/support/scenario/junitxml/happyday/test_junitxml_happyday.py
+nose2/tests/functional/support/scenario/junitxml/missing_properties/test_junitxml_missing_properties.py
+nose2/tests/functional/support/scenario/junitxml/missing_properties/unittest.cfg
+nose2/tests/functional/support/scenario/junitxml/with_properties/test_junitxml_with_properties.py
+nose2/tests/functional/support/scenario/junitxml/with_properties/unittest.cfg
nose2/tests/functional/support/scenario/layers/test_layers.py
nose2/tests/functional/support/scenario/layers_and_attributes/test_layers_and_attributes.py
nose2/tests/functional/support/scenario/layers_setups/higher_layer_setup.py
@@ -242,6 +255,7 @@ nose2/tests/unit/test_session.py
nose2/tests/unit/test_testcase_loader.py
nose2/tests/unit/test_testclass_loader.py
nose2/tests/unit/test_testid_plugin.py
+nose2/tests/unit/test_util.py
nose2/tools/__init__.py
nose2/tools/decorators.py
nose2/tools/params.py
diff --git a/nose2.egg-info/entry_points.txt b/nose2.egg-info/entry_points.txt
index fea5735..22d3d04 100644
--- a/nose2.egg-info/entry_points.txt
+++ b/nose2.egg-info/entry_points.txt
@@ -1,4 +1,4 @@
[console_scripts]
nose2 = nose2:discover
-nose2-2.6 = nose2:discover
+nose2-3.2 = nose2:discover
diff --git a/nose2.egg-info/requires.txt b/nose2.egg-info/requires.txt
index fdb7476..30fe566 100644
--- a/nose2.egg-info/requires.txt
+++ b/nose2.egg-info/requires.txt
@@ -1,6 +1,4 @@
six>=1.1
-unittest2>=0.5.1,<0.6
-argparse>=1.2.1,<1.3
[coverage_plugin]
-cov-core>=1.12
\ No newline at end of file
+cov-core>=1.12
diff --git a/nose2/collector.py b/nose2/collector.py
index 70fcd87..63a1854 100644
--- a/nose2/collector.py
+++ b/nose2/collector.py
@@ -13,11 +13,16 @@ def collector():
ok = self._collector(result_)
sys.exit(not ok)
- def _collector(self, result_):
+ def _get_objects(self):
ssn = session.Session()
ldr = loader.PluggableTestLoader(ssn)
rnr = runner.PluggableTestRunner(ssn)
+ return ssn, ldr, rnr
+
+ def _collector(self, result_):
+ ssn, ldr, rnr = self._get_objects()
+ ssn.testLoader = ldr
ssn.loadConfigFiles('unittest.cfg', 'nose2.cfg', 'setup.cfg')
ssn.setStartDir()
ssn.prepareSysPath()
diff --git a/nose2/compat.py b/nose2/compat.py
index 4464f4d..22cca6c 100644
--- a/nose2/compat.py
+++ b/nose2/compat.py
@@ -1,7 +1,7 @@
"""unittest/unittest2 compatibility wrapper.
-Anything internal to nose2 *must* import unittest from here, to be
-sure that it is using unittest2 when on older pythons.
+Anything internal to nose2 *must* import unittest from here to be
+certain that it is using unittest2 when run on older Python versions.
Yes::
@@ -26,7 +26,7 @@ try:
unittest.installHandler
except AttributeError:
raise ImportError(
- "Built-in unittest version too old, unittest2 is required")
... 1867 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/nose2.git
More information about the Python-modules-commits
mailing list