Merge branch 'master' into features
This commit is contained in:
		
						commit
						0c05ca1fd5
					
				|  | @ -21,10 +21,9 @@ env: | ||||||
|     - TESTENV=py33 |     - TESTENV=py33 | ||||||
|     - TESTENV=py33 |     - TESTENV=py33 | ||||||
|     - TESTENV=py34 |     - TESTENV=py34 | ||||||
|     - TESTENV=py34-pexpect |     - TESTENV=py35-pexpect | ||||||
|     - TESTENV=py34-trial |     - TESTENV=py35-trial | ||||||
|     - TESTENV=py34-trial |     - TESTENV=py35-xdist | ||||||
|     - TESTENV=py34-xdist |  | ||||||
|     - TESTENV=py35 |     - TESTENV=py35 | ||||||
|     - TESTENV=pypy |     - TESTENV=pypy | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,10 @@ | ||||||
| 2.8.1.dev | 2.8.1.dev | ||||||
| --------- | --------- | ||||||
| 
 | 
 | ||||||
|  | - Fix issue #1064: ""--junitxml" regression when used with the | ||||||
|  |   "pytest-xdist" plugin, with test reports being assigned to the wrong tests. | ||||||
|  |   Thanks Daniel Grunwald for the report and Bruno Oliveira for the PR. | ||||||
|  | 
 | ||||||
| - (experimental) adapt more SEMVER style versioning and change meaning of  | - (experimental) adapt more SEMVER style versioning and change meaning of  | ||||||
|   master branch in git repo: "master" branch now keeps the bugfixes, changes  |   master branch in git repo: "master" branch now keeps the bugfixes, changes  | ||||||
|   aimed for micro releases.  "features" branch will only be be released  |   aimed for micro releases.  "features" branch will only be be released  | ||||||
|  |  | ||||||
|  | @ -10,19 +10,19 @@ Note: this assumes you have already registered on pypi. | ||||||
| 3. Write doc/en/announce/release-VERSION.txt and include | 3. Write doc/en/announce/release-VERSION.txt and include | ||||||
|    it in doc/en/announce/index.txt |    it in doc/en/announce/index.txt | ||||||
| 
 | 
 | ||||||
| 4. Use devpi for uploading a release tarball to a staging area: | 4. Use devpi for uploading a release tarball to a staging area:: | ||||||
| 
 | 
 | ||||||
|      ``devpi use https://devpi.net/USER/dev`` |      devpi use https://devpi.net/USER/dev | ||||||
|      ``devpi upload --formats sdist,bdist_wheel`` |      devpi upload --formats sdist,bdist_wheel | ||||||
| 
 | 
 | ||||||
| 5. Run from multiple machines: | 5. Run from multiple machines:: | ||||||
| 
 | 
 | ||||||
|      ``devpi use https://devpi.net/USER/dev`` |      devpi use https://devpi.net/USER/dev | ||||||
|      ``devpi test pytest==VERSION`` |      devpi test pytest==VERSION | ||||||
| 
 | 
 | ||||||
| 6. Check that tests pass for relevant combinations with | 6. Check that tests pass for relevant combinations with:: | ||||||
| 
 | 
 | ||||||
|      ``devpi list pytest`` |        devpi list pytest | ||||||
| 
 | 
 | ||||||
|    or look at failures with "devpi list -f pytest". |    or look at failures with "devpi list -f pytest". | ||||||
|    There will be some failed environments like e.g. the py33-trial  |    There will be some failed environments like e.g. the py33-trial  | ||||||
|  | @ -56,7 +56,7 @@ Note: this assumes you have already registered on pypi. | ||||||
| 
 | 
 | ||||||
|    This requires ssh-login permission on pytest.org because it uses |    This requires ssh-login permission on pytest.org because it uses | ||||||
|    rsync. |    rsync. | ||||||
|    Note that the "install" target of doc/en/Makefile defines where the |    Note that the ``install`` target of ``doc/en/Makefile`` defines where the | ||||||
|    rsync goes to, typically to the "latest" section of pytest.org. |    rsync goes to, typically to the "latest" section of pytest.org. | ||||||
| 
 | 
 | ||||||
|    If you are making a minor release (e.g. 5.4), you also need to manually |    If you are making a minor release (e.g. 5.4), you also need to manually | ||||||
|  | @ -71,8 +71,8 @@ Note: this assumes you have already registered on pypi. | ||||||
| 
 | 
 | ||||||
|       devpi push pytest-VERSION pypi:NAME |       devpi push pytest-VERSION pypi:NAME | ||||||
| 
 | 
 | ||||||
|     where NAME is the name of pypi.python.org as configured in your |    where NAME is the name of pypi.python.org as configured in your ``~/.pypirc`` | ||||||
|     ~/.pypirc file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_. |    file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_. | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 12. Send release announcement to mailing lists: | 12. Send release announcement to mailing lists: | ||||||
|  |  | ||||||
							
								
								
									
										31
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										31
									
								
								Makefile
								
								
								
								
							|  | @ -1,31 +0,0 @@ | ||||||
| # Set of targets useful for development/release process
 |  | ||||||
| PYTHON = python2.7 |  | ||||||
| PATH := $(PWD)/.env/bin:$(PATH) |  | ||||||
| REGENDOC_ARGS := \
 |  | ||||||
| 	--normalize "/={8,} (.*) ={8,}/======= \1 ========/" \
 |  | ||||||
| 	--normalize "/_{8,} (.*) _{8,}/_______ \1 ________/" \
 |  | ||||||
| 	--normalize "/in \d+.\d+ seconds/in 0.12 seconds/" \
 |  | ||||||
| 	--normalize "@/tmp/pytest-\d+/@/tmp/pytest-NaN/@" |  | ||||||
| 
 |  | ||||||
| # prepare virtual python environment
 |  | ||||||
| .env: |  | ||||||
| 	virtualenv .env -p $(PYTHON) |  | ||||||
| 
 |  | ||||||
| # install all needed for development
 |  | ||||||
| develop: .env |  | ||||||
| 	pip install -e . tox -r requirements-docs.txt |  | ||||||
| 
 |  | ||||||
| # clean the development envrironment
 |  | ||||||
| clean: |  | ||||||
| 	-rm -rf .env |  | ||||||
| 
 |  | ||||||
| # generate documentation
 |  | ||||||
| docs: develop |  | ||||||
| 	find doc/en -name '*.rst' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc ${REGENDOC_ARGS} |  | ||||||
| 	cd doc/en; make html |  | ||||||
| 
 |  | ||||||
| # upload documentation
 |  | ||||||
| upload-docs: develop |  | ||||||
| 	find doc/en -name '*.rst' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc ${REGENDOC_ARGS} --update |  | ||||||
| 	#cd doc/en; make install |  | ||||||
| 
 |  | ||||||
|  | @ -101,6 +101,8 @@ class LogXML(object): | ||||||
|         self.logfile = os.path.normpath(os.path.abspath(logfile)) |         self.logfile = os.path.normpath(os.path.abspath(logfile)) | ||||||
|         self.prefix = prefix |         self.prefix = prefix | ||||||
|         self.tests = [] |         self.tests = [] | ||||||
|  |         self.tests_by_nodeid = {}  # nodeid -> Junit.testcase | ||||||
|  |         self.durations = {}  # nodeid -> total duration (setup+call+teardown) | ||||||
|         self.passed = self.skipped = 0 |         self.passed = self.skipped = 0 | ||||||
|         self.failed = self.errors = 0 |         self.failed = self.errors = 0 | ||||||
|         self.custom_properties = {} |         self.custom_properties = {} | ||||||
|  | @ -117,11 +119,16 @@ class LogXML(object): | ||||||
|             "classname": ".".join(classnames), |             "classname": ".".join(classnames), | ||||||
|             "name": bin_xml_escape(names[-1]), |             "name": bin_xml_escape(names[-1]), | ||||||
|             "file": report.location[0], |             "file": report.location[0], | ||||||
|             "time": 0, |             "time": self.durations.get(report.nodeid, 0), | ||||||
|         } |         } | ||||||
|         if report.location[1] is not None: |         if report.location[1] is not None: | ||||||
|             attrs["line"] = report.location[1] |             attrs["line"] = report.location[1] | ||||||
|         self.tests.append(Junit.testcase(**attrs)) |         testcase = Junit.testcase(**attrs) | ||||||
|  |         custom_properties = self.pop_custom_properties() | ||||||
|  |         if custom_properties: | ||||||
|  |             testcase.append(custom_properties) | ||||||
|  |         self.tests.append(testcase) | ||||||
|  |         self.tests_by_nodeid[report.nodeid] = testcase | ||||||
| 
 | 
 | ||||||
|     def _write_captured_output(self, report): |     def _write_captured_output(self, report): | ||||||
|         for capname in ('out', 'err'): |         for capname in ('out', 'err'): | ||||||
|  | @ -136,17 +143,20 @@ class LogXML(object): | ||||||
|     def append(self, obj): |     def append(self, obj): | ||||||
|         self.tests[-1].append(obj) |         self.tests[-1].append(obj) | ||||||
| 
 | 
 | ||||||
|     def append_custom_properties(self): |     def pop_custom_properties(self): | ||||||
|  |         """Return a Junit node containing custom properties set for | ||||||
|  |         the current test, if any, and reset the current custom properties. | ||||||
|  |         """ | ||||||
|         if self.custom_properties: |         if self.custom_properties: | ||||||
|             self.tests[-1].append( |             result = Junit.properties( | ||||||
|                 Junit.properties( |  | ||||||
|                 [ |                 [ | ||||||
|                     Junit.property(name=name, value=value) |                     Junit.property(name=name, value=value) | ||||||
|                     for name, value in self.custom_properties.items() |                     for name, value in self.custom_properties.items() | ||||||
|                 ] |                 ] | ||||||
|             ) |             ) | ||||||
|             ) |  | ||||||
|             self.custom_properties.clear() |             self.custom_properties.clear() | ||||||
|  |             return result | ||||||
|  |         return None | ||||||
| 
 | 
 | ||||||
|     def append_pass(self, report): |     def append_pass(self, report): | ||||||
|         self.passed += 1 |         self.passed += 1 | ||||||
|  | @ -206,20 +216,54 @@ class LogXML(object): | ||||||
|         self._write_captured_output(report) |         self._write_captured_output(report) | ||||||
| 
 | 
 | ||||||
|     def pytest_runtest_logreport(self, report): |     def pytest_runtest_logreport(self, report): | ||||||
|         if report.when == "setup": |         """handle a setup/call/teardown report, generating the appropriate | ||||||
|             self._opentestcase(report) |         xml tags as necessary. | ||||||
|         self.tests[-1].attr.time += getattr(report, 'duration', 0) | 
 | ||||||
|         self.append_custom_properties() |         note: due to plugins like xdist, this hook may be called in interlaced | ||||||
|  |         order with reports from other nodes. for example: | ||||||
|  | 
 | ||||||
|  |         usual call order: | ||||||
|  |             -> setup node1 | ||||||
|  |             -> call node1 | ||||||
|  |             -> teardown node1 | ||||||
|  |             -> setup node2 | ||||||
|  |             -> call node2 | ||||||
|  |             -> teardown node2 | ||||||
|  | 
 | ||||||
|  |         possible call order in xdist: | ||||||
|  |             -> setup node1 | ||||||
|  |             -> call node1 | ||||||
|  |             -> setup node2 | ||||||
|  |             -> call node2 | ||||||
|  |             -> teardown node2 | ||||||
|  |             -> teardown node1 | ||||||
|  |         """ | ||||||
|         if report.passed: |         if report.passed: | ||||||
|             if report.when == "call":  # ignore setup/teardown |             if report.when == "call":  # ignore setup/teardown | ||||||
|  |                 self._opentestcase(report) | ||||||
|                 self.append_pass(report) |                 self.append_pass(report) | ||||||
|         elif report.failed: |         elif report.failed: | ||||||
|  |             self._opentestcase(report) | ||||||
|             if report.when != "call": |             if report.when != "call": | ||||||
|                 self.append_error(report) |                 self.append_error(report) | ||||||
|             else: |             else: | ||||||
|                 self.append_failure(report) |                 self.append_failure(report) | ||||||
|         elif report.skipped: |         elif report.skipped: | ||||||
|  |             self._opentestcase(report) | ||||||
|             self.append_skipped(report) |             self.append_skipped(report) | ||||||
|  |         self.update_testcase_duration(report) | ||||||
|  | 
 | ||||||
|  |     def update_testcase_duration(self, report): | ||||||
|  |         """accumulates total duration for nodeid from given report and updates | ||||||
|  |         the Junit.testcase with the new total if already created. | ||||||
|  |         """ | ||||||
|  |         total = self.durations.get(report.nodeid, 0.0) | ||||||
|  |         total += getattr(report, 'duration', 0.0) | ||||||
|  |         self.durations[report.nodeid] = total | ||||||
|  | 
 | ||||||
|  |         testcase = self.tests_by_nodeid.get(report.nodeid) | ||||||
|  |         if testcase is not None: | ||||||
|  |             testcase.attr.time = total | ||||||
| 
 | 
 | ||||||
|     def pytest_collectreport(self, report): |     def pytest_collectreport(self, report): | ||||||
|         if not report.passed: |         if not report.passed: | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								appveyor.yml
								
								
								
								
							
							
						
						
									
										22
									
								
								appveyor.yml
								
								
								
								
							|  | @ -34,6 +34,16 @@ environment: | ||||||
|       PYTHON_ARCH: "64" |       PYTHON_ARCH: "64" | ||||||
|       TESTENV: "py34" |       TESTENV: "py34" | ||||||
| 
 | 
 | ||||||
|  |     - PYTHON: "C:\\Python35" | ||||||
|  |       PYTHON_VERSION: "3.5.x" # currently 3.5.0 | ||||||
|  |       PYTHON_ARCH: "32" | ||||||
|  |       TESTENV: "py35" | ||||||
|  | 
 | ||||||
|  |     - PYTHON: "C:\\Python35-x64" | ||||||
|  |       PYTHON_VERSION: "3.5.x" # currently 3.5.0 | ||||||
|  |       PYTHON_ARCH: "64" | ||||||
|  |       TESTENV: "py35" | ||||||
|  | 
 | ||||||
|     # Also test a Python version not pre-installed |     # Also test a Python version not pre-installed | ||||||
|     # See: https://github.com/ogrisel/python-appveyor-demo/issues/10 |     # See: https://github.com/ogrisel/python-appveyor-demo/issues/10 | ||||||
| 
 | 
 | ||||||
|  | @ -42,6 +52,18 @@ environment: | ||||||
|       PYTHON_ARCH: "32" |       PYTHON_ARCH: "32" | ||||||
|       TESTENV: "py26" |       TESTENV: "py26" | ||||||
| 
 | 
 | ||||||
|  |     # xdist testing | ||||||
|  | 
 | ||||||
|  |     - PYTHON: "C:\\Python27" | ||||||
|  |       PYTHON_VERSION: "2.7.x" # currently 2.7.9 | ||||||
|  |       PYTHON_ARCH: "32" | ||||||
|  |       TESTENV: "py27-xdist" | ||||||
|  | 
 | ||||||
|  |     - PYTHON: "C:\\Python35" | ||||||
|  |       PYTHON_VERSION: "3.5.x" # currently 3.5.0 | ||||||
|  |       PYTHON_ARCH: "32" | ||||||
|  |       TESTENV: "py35-xdist" | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| install: | install: | ||||||
|   - ECHO "Filesystem root:" |   - ECHO "Filesystem root:" | ||||||
|  |  | ||||||
|  | @ -12,6 +12,13 @@ PAPEROPT_a4     = -D latex_paper_size=a4 | ||||||
| PAPEROPT_letter = -D latex_paper_size=letter | PAPEROPT_letter = -D latex_paper_size=letter | ||||||
| ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||||||
| 
 | 
 | ||||||
|  | REGENDOC_ARGS := \
 | ||||||
|  | 	--normalize "/={8,} (.*) ={8,}/======= \1 ========/" \
 | ||||||
|  | 	--normalize "/_{8,} (.*) _{8,}/_______ \1 ________/" \
 | ||||||
|  | 	--normalize "/in \d+.\d+ seconds/in 0.12 seconds/" \
 | ||||||
|  | 	--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | ||||||
| 
 | 
 | ||||||
|  | @ -46,7 +53,7 @@ installall: clean install installpdf | ||||||
| 	@echo "done" | 	@echo "done" | ||||||
| 
 | 
 | ||||||
| regen: | regen: | ||||||
| 	PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst | 	PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst ${REGENDOC_ARGS} | ||||||
| 
 | 
 | ||||||
| html: | html: | ||||||
| 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ you will see the return value of the function call:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_assert1.py |     $ py.test test_assert1.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -146,7 +146,7 @@ if you run this module:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_assert2.py |     $ py.test test_assert2.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -225,7 +225,7 @@ the conftest file:: | ||||||
|    E       assert Comparing Foo instances: |    E       assert Comparing Foo instances: | ||||||
|    E            vals: 1 != 2 |    E            vals: 1 != 2 | ||||||
|     |     | ||||||
|    test_foocompare.py:8: AssertionError |    test_foocompare.py:11: AssertionError | ||||||
|    1 failed in 0.12 seconds |    1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| .. _assert-details: | .. _assert-details: | ||||||
|  |  | ||||||
|  | @ -73,6 +73,16 @@ You can ask for available builtin or project-custom | ||||||
| :ref:`fixtures <fixtures>` by typing:: | :ref:`fixtures <fixtures>` by typing:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -q --fixtures |     $ py.test -q --fixtures | ||||||
|  |     cache | ||||||
|  |         Return a cache object that can persist state between testing sessions. | ||||||
|  |          | ||||||
|  |         cache.get(key, default) | ||||||
|  |         cache.set(key, value) | ||||||
|  |          | ||||||
|  |         Keys must be strings not containing a "/" separator. Add a unique identifier | ||||||
|  |         (such as plugin/app name) to avoid clashes with other cache users. | ||||||
|  |          | ||||||
|  |         Values can be any object handled by the json stdlib module. | ||||||
|     capsys |     capsys | ||||||
|         enables capturing of writes to sys.stdout/sys.stderr and makes |         enables capturing of writes to sys.stdout/sys.stderr and makes | ||||||
|         captured output available via ``capsys.readouterr()`` method calls |         captured output available via ``capsys.readouterr()`` method calls | ||||||
|  | @ -81,6 +91,10 @@ You can ask for available builtin or project-custom | ||||||
|         enables capturing of writes to file descriptors 1 and 2 and makes |         enables capturing of writes to file descriptors 1 and 2 and makes | ||||||
|         captured output available via ``capfd.readouterr()`` method calls |         captured output available via ``capfd.readouterr()`` method calls | ||||||
|         which return a ``(out, err)`` tuple. |         which return a ``(out, err)`` tuple. | ||||||
|  |     record_xml_property | ||||||
|  |         Fixture that adds extra xml properties to the tag for the calling test. | ||||||
|  |         The fixture is callable with (name, value), with value being automatically | ||||||
|  |         xml-encoded. | ||||||
|     monkeypatch |     monkeypatch | ||||||
|         The returned ``monkeypatch`` funcarg provides these |         The returned ``monkeypatch`` funcarg provides these | ||||||
|         helper methods to modify objects, dictionaries or os.environ:: |         helper methods to modify objects, dictionaries or os.environ:: | ||||||
|  | @ -108,6 +122,8 @@ You can ask for available builtin or project-custom | ||||||
|          |          | ||||||
|         See http://docs.python.org/library/warnings.html for information |         See http://docs.python.org/library/warnings.html for information | ||||||
|         on warning categories. |         on warning categories. | ||||||
|  |     tmpdir_factory | ||||||
|  |         Return a TempdirFactory instance for the test session. | ||||||
|     tmpdir |     tmpdir | ||||||
|         return a temporary directory path object |         return a temporary directory path object | ||||||
|         which is unique to each test function invocation, |         which is unique to each test function invocation, | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| cache: working with cross-testrun state | Cache: working with cross-testrun state | ||||||
| ======================================= | ======================================= | ||||||
| 
 | 
 | ||||||
| .. versionadded:: 2.8 | .. versionadded:: 2.8 | ||||||
|  | @ -44,8 +44,8 @@ If you run this for the first time you will see two failures:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -q |     $ py.test -q | ||||||
|     .................F.......F........................ |     .................F.......F........................ | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     _______________________________ test_num[17] _______________________________ |     _______ test_num[17] ________ | ||||||
|      |      | ||||||
|     i = 17 |     i = 17 | ||||||
|      |      | ||||||
|  | @ -56,7 +56,7 @@ If you run this for the first time you will see two failures:: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     _______________________________ test_num[25] _______________________________ |     _______ test_num[25] ________ | ||||||
|      |      | ||||||
|     i = 25 |     i = 25 | ||||||
|      |      | ||||||
|  | @ -67,21 +67,21 @@ If you run this for the first time you will see two failures:: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     2 failed, 48 passed in 0.04 seconds |     2 failed, 48 passed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| If you then run it with ``--lf``:: | If you then run it with ``--lf``:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --lf |     $ py.test --lf | ||||||
|     =========================== test session starts ============================ |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     run-last-failure: rerun last 2 failures |     run-last-failure: rerun last 2 failures | ||||||
|     rootdir: /tmp/doc-exec-94, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 50 items |     collected 50 items | ||||||
|      |      | ||||||
|     test_50.py FF |     test_50.py FF | ||||||
|      |      | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     _______________________________ test_num[17] _______________________________ |     _______ test_num[17] ________ | ||||||
|      |      | ||||||
|     i = 17 |     i = 17 | ||||||
|      |      | ||||||
|  | @ -92,7 +92,7 @@ If you then run it with ``--lf``:: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     _______________________________ test_num[25] _______________________________ |     _______ test_num[25] ________ | ||||||
|      |      | ||||||
|     i = 25 |     i = 25 | ||||||
|      |      | ||||||
|  | @ -103,7 +103,7 @@ If you then run it with ``--lf``:: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     ================= 2 failed, 48 deselected in 0.01 seconds ================== |     ======= 2 failed, 48 deselected in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| You have run only the two failing test from the last run, while 48 tests have | You have run only the two failing test from the last run, while 48 tests have | ||||||
| not been run ("deselected"). | not been run ("deselected"). | ||||||
|  | @ -113,16 +113,16 @@ previous failures will be executed first (as can be seen from the series | ||||||
| of ``FF`` and dots):: | of ``FF`` and dots):: | ||||||
| 
 | 
 | ||||||
|     $ py.test --ff |     $ py.test --ff | ||||||
|     =========================== test session starts ============================ |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     run-last-failure: rerun last 2 failures first |     run-last-failure: rerun last 2 failures first | ||||||
|     rootdir: /tmp/doc-exec-94, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 50 items |     collected 50 items | ||||||
|      |      | ||||||
|     test_50.py FF................................................ |     test_50.py FF................................................ | ||||||
|      |      | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     _______________________________ test_num[17] _______________________________ |     _______ test_num[17] ________ | ||||||
|      |      | ||||||
|     i = 17 |     i = 17 | ||||||
|      |      | ||||||
|  | @ -133,7 +133,7 @@ of ``FF`` and dots):: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     _______________________________ test_num[25] _______________________________ |     _______ test_num[25] ________ | ||||||
|      |      | ||||||
|     i = 25 |     i = 25 | ||||||
|      |      | ||||||
|  | @ -144,7 +144,7 @@ of ``FF`` and dots):: | ||||||
|     E          Failed: bad luck |     E          Failed: bad luck | ||||||
|      |      | ||||||
|     test_50.py:6: Failed |     test_50.py:6: Failed | ||||||
|     =================== 2 failed, 48 passed in 0.03 seconds ==================== |     ======= 2 failed, 48 passed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| .. _`config.cache`: | .. _`config.cache`: | ||||||
| 
 | 
 | ||||||
|  | @ -179,8 +179,8 @@ of the sleep:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -q |     $ py.test -q | ||||||
|     F |     F | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     ______________________________ test_function _______________________________ |     _______ test_function ________ | ||||||
|      |      | ||||||
|     mydata = 42 |     mydata = 42 | ||||||
|      |      | ||||||
|  | @ -189,15 +189,15 @@ of the sleep:: | ||||||
|     E       assert 42 == 23 |     E       assert 42 == 23 | ||||||
|      |      | ||||||
|     test_caching.py:14: AssertionError |     test_caching.py:14: AssertionError | ||||||
|     1 failed in 5.41 seconds |     1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| If you run it a second time the value will be retrieved from | If you run it a second time the value will be retrieved from | ||||||
| the cache and this will be quick:: | the cache and this will be quick:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -q |     $ py.test -q | ||||||
|     F |     F | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     ______________________________ test_function _______________________________ |     _______ test_function ________ | ||||||
|      |      | ||||||
|     mydata = 42 |     mydata = 42 | ||||||
|      |      | ||||||
|  | @ -206,7 +206,7 @@ the cache and this will be quick:: | ||||||
|     E       assert 42 == 23 |     E       assert 42 == 23 | ||||||
|      |      | ||||||
|     test_caching.py:14: AssertionError |     test_caching.py:14: AssertionError | ||||||
|     1 failed in 0.01 seconds |     1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| See the `cache-api`_ for more details. | See the `cache-api`_ for more details. | ||||||
| 
 | 
 | ||||||
|  | @ -218,15 +218,15 @@ You can always peek at the content of the cache using the | ||||||
| ``--cache-clear`` command line option:: | ``--cache-clear`` command line option:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --cache-clear |     $ py.test --cache-clear | ||||||
|     =========================== test session starts ============================ |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: /tmp/doc-exec-94, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|     test_caching.py F |     test_caching.py F | ||||||
|      |      | ||||||
|     ================================= FAILURES ================================= |     ======= FAILURES ======== | ||||||
|     ______________________________ test_function _______________________________ |     _______ test_function ________ | ||||||
|      |      | ||||||
|     mydata = 42 |     mydata = 42 | ||||||
|      |      | ||||||
|  | @ -235,7 +235,7 @@ You can always peek at the content of the cache using the | ||||||
|     E       assert 42 == 23 |     E       assert 42 == 23 | ||||||
|      |      | ||||||
|     test_caching.py:14: AssertionError |     test_caching.py:14: AssertionError | ||||||
|     ========================= 1 failed in 5.41 seconds ========================= |     ======= 1 failed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| Clearing Cache content | Clearing Cache content | ||||||
| ------------------------------- | ------------------------------- | ||||||
|  | @ -253,7 +253,7 @@ than speed. | ||||||
| .. _`cache-api`: | .. _`cache-api`: | ||||||
| 
 | 
 | ||||||
| config.cache API | config.cache API | ||||||
| ======================================== | ------------------ | ||||||
| 
 | 
 | ||||||
| The `config.cache`` object allows other plugins, | The `config.cache`` object allows other plugins, | ||||||
| including ``conftest.py`` files, | including ``conftest.py`` files, | ||||||
|  |  | ||||||
|  | @ -64,7 +64,7 @@ of the failing function and hide the other one:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -78,7 +78,7 @@ of the failing function and hide the other one:: | ||||||
|     E       assert False |     E       assert False | ||||||
|      |      | ||||||
|     test_module.py:9: AssertionError |     test_module.py:9: AssertionError | ||||||
|     ---------------------------- Captured stdout setup ----------------------------- |     -------------------------- Captured stdout setup --------------------------- | ||||||
|     setting up <function test_func2 at 0xdeadbeef> |     setting up <function test_func2 at 0xdeadbeef> | ||||||
|     ======= 1 failed, 1 passed in 0.12 seconds ======== |     ======= 1 failed, 1 passed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -12,12 +12,12 @@ Full pytest documentation | ||||||
| 
 | 
 | ||||||
|    overview |    overview | ||||||
|    apiref |    apiref | ||||||
|    cache |  | ||||||
|    plugins |  | ||||||
|    plugins_index/index |  | ||||||
|    example/index |    example/index | ||||||
|    talks |    plugins | ||||||
|  |    cache | ||||||
|    contributing |    contributing | ||||||
|  |    plugins_index/index | ||||||
|  |    talks | ||||||
|    funcarg_compare |    funcarg_compare | ||||||
|    announce/index |    announce/index | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ then you can just invoke ``py.test`` without command line options:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  |  | ||||||
|  | @ -31,7 +31,8 @@ You can then restrict a test run to only run tests marked with ``webtest``:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v -m webtest |     $ py.test -v -m webtest | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -44,7 +45,8 @@ Or the inverse, running all tests except the webtest ones:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v -m "not webtest" |     $ py.test -v -m "not webtest" | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -64,7 +66,8 @@ tests based on their module, class, method, or function name:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v test_server.py::TestClass::test_method |     $ py.test -v test_server.py::TestClass::test_method | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 5 items |     collecting ... collected 5 items | ||||||
|      |      | ||||||
|  | @ -76,7 +79,8 @@ You can also select on the class:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v test_server.py::TestClass |     $ py.test -v test_server.py::TestClass | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -88,7 +92,8 @@ Or select multiple nodes:: | ||||||
| 
 | 
 | ||||||
|   $ py.test -v test_server.py::TestClass test_server.py::test_send_http |   $ py.test -v test_server.py::TestClass test_server.py::test_send_http | ||||||
|   ======= test session starts ======== |   ======= test session starts ======== | ||||||
|   platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |   platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |   cachedir: .cache | ||||||
|   rootdir: $REGENDOC_TMPDIR, inifile:  |   rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|   collecting ... collected 8 items |   collecting ... collected 8 items | ||||||
|    |    | ||||||
|  | @ -125,7 +130,8 @@ select tests based on their names:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v -k http  # running with the above defined example module |     $ py.test -v -k http  # running with the above defined example module | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -138,7 +144,8 @@ And you can also run all tests except the ones that match the keyword:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -k "not send_http" -v |     $ py.test -k "not send_http" -v | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -153,7 +160,8 @@ Or to select "http" and "quick" tests:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -k "http or quick" -v |     $ py.test -k "http or quick" -v | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 4 items |     collecting ... collected 4 items | ||||||
|      |      | ||||||
|  | @ -342,7 +350,7 @@ the test needs:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -E stage2 |     $ py.test -E stage2 | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -354,7 +362,7 @@ and here is one that specifies exactly the environment needed:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -E stage1 |     $ py.test -E stage1 | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -473,28 +481,28 @@ then you will see two test skipped and two executed tests as expected:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -rs # this option reports skip reasons |     $ py.test -rs # this option reports skip reasons | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 4 items |     collected 4 items | ||||||
|      |      | ||||||
|     test_plat.py s.s. |     test_plat.py sss. | ||||||
|     ======= short test summary info ======== |     ======= short test summary info ======== | ||||||
|     SKIP [2] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux2 |     SKIP [3] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux | ||||||
|      |      | ||||||
|     ======= 2 passed, 2 skipped in 0.12 seconds ======== |     ======= 1 passed, 3 skipped in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| Note that if you specify a platform via the marker-command line option like this:: | Note that if you specify a platform via the marker-command line option like this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -m linux2 |     $ py.test -m linux2 | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 4 items |     collected 4 items | ||||||
|      |      | ||||||
|     test_plat.py . |     test_plat.py s | ||||||
|      |      | ||||||
|     ======= 3 tests deselected by "-m 'linux2'" ======== |     ======= 3 tests deselected by "-m 'linux2'" ======== | ||||||
|     ======= 1 passed, 3 deselected in 0.12 seconds ======== |     ======= 1 skipped, 3 deselected in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| then the unmarked-tests will not be run.  It is thus a way to restrict the run to the specific tests. | then the unmarked-tests will not be run.  It is thus a way to restrict the run to the specific tests. | ||||||
| 
 | 
 | ||||||
|  | @ -539,7 +547,7 @@ We can now use the ``-m option`` to select one set:: | ||||||
| 
 | 
 | ||||||
|   $ py.test -m interface --tb=short |   $ py.test -m interface --tb=short | ||||||
|   ======= test session starts ======== |   ======= test session starts ======== | ||||||
|   platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |   platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|   rootdir: $REGENDOC_TMPDIR, inifile:  |   rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|   collected 4 items |   collected 4 items | ||||||
|    |    | ||||||
|  | @ -561,7 +569,7 @@ or to select both "event" and "interface" tests:: | ||||||
| 
 | 
 | ||||||
|   $ py.test -m "interface or event" --tb=short |   $ py.test -m "interface or event" --tb=short | ||||||
|   ======= test session starts ======== |   ======= test session starts ======== | ||||||
|   platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |   platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|   rootdir: $REGENDOC_TMPDIR, inifile:  |   rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|   collected 4 items |   collected 4 items | ||||||
|    |    | ||||||
|  |  | ||||||
|  | @ -27,8 +27,8 @@ now execute the test specification:: | ||||||
| 
 | 
 | ||||||
|     nonpython $ py.test test_simple.yml |     nonpython $ py.test test_simple.yml | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR/nonpython, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|     test_simple.yml .F |     test_simple.yml .F | ||||||
|  | @ -40,6 +40,8 @@ now execute the test specification:: | ||||||
|        no further details known at this point. |        no further details known at this point. | ||||||
|     ======= 1 failed, 1 passed in 0.12 seconds ======== |     ======= 1 failed, 1 passed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
|  | .. regendoc:wipe | ||||||
|  | 
 | ||||||
| You get one dot for the passing ``sub1: sub1`` check and one failure. | You get one dot for the passing ``sub1: sub1`` check and one failure. | ||||||
| Obviously in the above ``conftest.py`` you'll want to implement a more | Obviously in the above ``conftest.py`` you'll want to implement a more | ||||||
| interesting interpretation of the yaml-values.  You can easily write | interesting interpretation of the yaml-values.  You can easily write | ||||||
|  | @ -57,8 +59,9 @@ consulted when reporting in ``verbose`` mode:: | ||||||
| 
 | 
 | ||||||
|     nonpython $ py.test -v |     nonpython $ py.test -v | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     cachedir: .cache | ||||||
|  |     rootdir: $REGENDOC_TMPDIR/nonpython, inifile:  | ||||||
|     collecting ... collected 2 items |     collecting ... collected 2 items | ||||||
|      |      | ||||||
|     test_simple.yml::ok PASSED |     test_simple.yml::ok PASSED | ||||||
|  | @ -71,15 +74,17 @@ consulted when reporting in ``verbose`` mode:: | ||||||
|        no further details known at this point. |        no further details known at this point. | ||||||
|     ======= 1 failed, 1 passed in 0.12 seconds ======== |     ======= 1 failed, 1 passed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
|  | .. regendoc:wipe | ||||||
|  | 
 | ||||||
| While developing your custom test collection and execution it's also | While developing your custom test collection and execution it's also | ||||||
| interesting to just look at the collection tree:: | interesting to just look at the collection tree:: | ||||||
| 
 | 
 | ||||||
|     nonpython $ py.test --collect-only |     nonpython $ py.test --collect-only | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR/nonpython, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|     <YamlFile 'example/nonpython/test_simple.yml'> |     <YamlFile 'test_simple.yml'> | ||||||
|       <YamlItem 'ok'> |       <YamlItem 'ok'> | ||||||
|       <YamlItem 'hello'> |       <YamlItem 'hello'> | ||||||
|      |      | ||||||
|  |  | ||||||
|  | @ -83,9 +83,12 @@ the argument name:: | ||||||
| 
 | 
 | ||||||
|     # content of test_time.py |     # content of test_time.py | ||||||
| 
 | 
 | ||||||
|  |     import pytest | ||||||
|  | 
 | ||||||
|     from datetime import datetime, timedelta |     from datetime import datetime, timedelta | ||||||
| 
 | 
 | ||||||
|     testdata = [(datetime(2001, 12, 12), datetime(2001, 12, 11), timedelta(1)), |     testdata = [ | ||||||
|  |         (datetime(2001, 12, 12), datetime(2001, 12, 11), timedelta(1)), | ||||||
|         (datetime(2001, 12, 11), datetime(2001, 12, 12), timedelta(-1)), |         (datetime(2001, 12, 11), datetime(2001, 12, 12), timedelta(-1)), | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
|  | @ -127,11 +130,18 @@ objects, they are still using the default pytest representation:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_time.py --collect-only |     $ py.test test_time.py --collect-only | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.3, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|  |     collected 6 items | ||||||
|  |     <Module 'test_time.py'> | ||||||
|  |       <Function 'test_timedistance_v0[a0-b0-expected0]'> | ||||||
|  |       <Function 'test_timedistance_v0[a1-b1-expected1]'> | ||||||
|  |       <Function 'test_timedistance_v1[forward]'> | ||||||
|  |       <Function 'test_timedistance_v1[backward]'> | ||||||
|  |       <Function 'test_timedistance_v2[20011212-20011211-expected0]'> | ||||||
|  |       <Function 'test_timedistance_v2[20011211-20011212-expected1]'> | ||||||
|      |      | ||||||
|     =======  in 0.12 seconds ======== |     =======  in 0.12 seconds ======== | ||||||
|     ERROR: file not found: test_time.py |  | ||||||
| 
 | 
 | ||||||
| A quick port of "testscenarios" | A quick port of "testscenarios" | ||||||
| ------------------------------------ | ------------------------------------ | ||||||
|  | @ -171,7 +181,7 @@ this is a fully self-contained example which you can run with:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_scenarios.py |     $ py.test test_scenarios.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 4 items |     collected 4 items | ||||||
|      |      | ||||||
|  | @ -184,7 +194,7 @@ If you just collect tests you'll also nicely see 'advanced' and 'basic' as varia | ||||||
| 
 | 
 | ||||||
|     $ py.test --collect-only test_scenarios.py |     $ py.test --collect-only test_scenarios.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 4 items |     collected 4 items | ||||||
|     <Module 'test_scenarios.py'> |     <Module 'test_scenarios.py'> | ||||||
|  | @ -249,7 +259,7 @@ Let's first see how it looks like at collection time:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_backends.py --collect-only |     $ py.test test_backends.py --collect-only | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|     <Module 'test_backends.py'> |     <Module 'test_backends.py'> | ||||||
|  | @ -265,7 +275,7 @@ And then when we run the test:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_db_initialized[d2] ________ |     _______ test_db_initialized[d2] ________ | ||||||
|      |      | ||||||
|     db = <conftest.DB2 instance at 0xdeadbeef> |     db = <conftest.DB2 object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_db_initialized(db): |         def test_db_initialized(db): | ||||||
|             # a dummy test |             # a dummy test | ||||||
|  | @ -288,7 +298,7 @@ parameter on particular arguments. It can be done by passing list or tuple of | ||||||
| arguments' names to ``indirect``. In the example below there is a function ``test_indirect`` which uses | arguments' names to ``indirect``. In the example below there is a function ``test_indirect`` which uses | ||||||
| two fixtures: ``x`` and ``y``. Here we give to indirect the list, which contains the name of the | two fixtures: ``x`` and ``y``. Here we give to indirect the list, which contains the name of the | ||||||
| fixture ``x``. The indirect parameter will be applied to this argument only, and the value ``a`` | fixture ``x``. The indirect parameter will be applied to this argument only, and the value ``a`` | ||||||
| will be passed to respective fixture function. | will be passed to respective fixture function:: | ||||||
| 
 | 
 | ||||||
|     # content of test_indirect_list.py |     # content of test_indirect_list.py | ||||||
| 
 | 
 | ||||||
|  | @ -306,17 +316,17 @@ will be passed to respective fixture function. | ||||||
|         assert x == 'aaa' |         assert x == 'aaa' | ||||||
|         assert y == 'b' |         assert y == 'b' | ||||||
| 
 | 
 | ||||||
| The result of this test will be successful: | The result of this test will be successful:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_indirect_list.py --collect-only |     $ py.test test_indirect_list.py --collect-only | ||||||
|     ============================= test session starts ============================== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.3, pytest-2.8.0.dev4, py-1.4.30, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: /home/elizabeth/work/pytest, inifile: tox.ini |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|     <Module 'testing/test_argnames.py'> |     <Module 'test_indirect_list.py'> | ||||||
|       <Function 'test_simple[a-b]'> |       <Function 'test_indirect[a-b]'> | ||||||
|      |      | ||||||
|     ===============================  in 0.02 seconds =============================== |     =======  in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| .. regendoc:wipe | .. regendoc:wipe | ||||||
| 
 | 
 | ||||||
|  | @ -361,7 +371,7 @@ argument sets to use for each test function.  Let's run it:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ TestClass.test_equals[1-2] ________ |     _______ TestClass.test_equals[1-2] ________ | ||||||
|      |      | ||||||
|     self = <test_parametrize.TestClass instance at 0xdeadbeef>, a = 1, b = 2 |     self = <test_parametrize.TestClass object at 0xdeadbeef>, a = 1, b = 2 | ||||||
|      |      | ||||||
|         def test_equals(self, a, b): |         def test_equals(self, a, b): | ||||||
|     >       assert a == b |     >       assert a == b | ||||||
|  | @ -389,8 +399,8 @@ Running it results in some skips if we don't have all the python interpreters in | ||||||
|    . $ py.test -rs -q multipython.py |    . $ py.test -rs -q multipython.py | ||||||
|    ssssssssssss...ssssssssssss |    ssssssssssss...ssssssssssss | ||||||
|    ======= short test summary info ======== |    ======= short test summary info ======== | ||||||
|    SKIP [12] $PWD/doc/en/example/multipython.py:22: 'python3.3' not found |    SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:22: 'python3.3' not found | ||||||
|    SKIP [12] $PWD/doc/en/example/multipython.py:22: 'python2.6' not found |    SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:22: 'python2.6' not found | ||||||
|    3 passed, 24 skipped in 0.12 seconds |    3 passed, 24 skipped in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| Indirect parametrization of optional implementations/imports | Indirect parametrization of optional implementations/imports | ||||||
|  | @ -438,7 +448,7 @@ If you run this with reporting for skips enabled:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -rs test_module.py |     $ py.test -rs test_module.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ then the test collection looks like this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --collect-only |     $ py.test --collect-only | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile: setup.cfg |     rootdir: $REGENDOC_TMPDIR, inifile: setup.cfg | ||||||
|     collected 2 items |     collected 2 items | ||||||
|     <Module 'check_myapp.py'> |     <Module 'check_myapp.py'> | ||||||
|  | @ -89,10 +89,10 @@ You can always peek at the collection tree without running tests like this:: | ||||||
| 
 | 
 | ||||||
|     . $ py.test --collect-only pythoncollection.py |     . $ py.test --collect-only pythoncollection.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini | ||||||
|     collected 3 items |     collected 3 items | ||||||
|     <Module 'example/pythoncollection.py'> |     <Module 'CWD/pythoncollection.py'> | ||||||
|       <Function 'test_function'> |       <Function 'test_function'> | ||||||
|       <Class 'TestClass'> |       <Class 'TestClass'> | ||||||
|         <Instance '()'> |         <Instance '()'> | ||||||
|  | @ -143,11 +143,9 @@ interpreters and will leave out the setup.py file:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --collect-only |     $ py.test --collect-only | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini | ||||||
|     collected 1 items |     collected 0 items | ||||||
|     <Module 'pkg/module_py2.py'> |  | ||||||
|       <Function 'test_only_on_python2'> |  | ||||||
|      |      | ||||||
|     =======  in 0.12 seconds ======== |     =======  in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ get on the terminal - we are working on that): | ||||||
| 
 | 
 | ||||||
|     assertion $ py.test failure_demo.py |     assertion $ py.test failure_demo.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR/assertion, inifile:  | ||||||
|     collected 42 items |     collected 42 items | ||||||
|      |      | ||||||
|     failure_demo.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |     failure_demo.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||||||
|  | @ -41,8 +41,8 @@ get on the terminal - we are working on that): | ||||||
|          |          | ||||||
|     >       assert f() == g() |     >       assert f() == g() | ||||||
|     E       assert 42 == 43 |     E       assert 42 == 43 | ||||||
|     E        +  where 42 = <function f at 0xdeadbeef>() |     E        +  where 42 = <function TestFailing.test_simple.<locals>.f at 0xdeadbeef>() | ||||||
|     E        +  and   43 = <function g at 0xdeadbeef>() |     E        +  and   43 = <function TestFailing.test_simple.<locals>.g at 0xdeadbeef>() | ||||||
|      |      | ||||||
|     failure_demo.py:28: AssertionError |     failure_demo.py:28: AssertionError | ||||||
|     _______ TestFailing.test_simple_multiline ________ |     _______ TestFailing.test_simple_multiline ________ | ||||||
|  | @ -55,7 +55,7 @@ get on the terminal - we are working on that): | ||||||
|     >                 6*9) |     >                 6*9) | ||||||
|      |      | ||||||
|     failure_demo.py:33:  |     failure_demo.py:33:  | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|      |      | ||||||
|     a = 42, b = 54 |     a = 42, b = 54 | ||||||
|      |      | ||||||
|  | @ -74,7 +74,7 @@ get on the terminal - we are working on that): | ||||||
|                 return 42 |                 return 42 | ||||||
|     >       assert not f() |     >       assert not f() | ||||||
|     E       assert not 42 |     E       assert not 42 | ||||||
|     E        +  where 42 = <function f at 0xdeadbeef>() |     E        +  where 42 = <function TestFailing.test_not.<locals>.f at 0xdeadbeef>() | ||||||
|      |      | ||||||
|     failure_demo.py:38: AssertionError |     failure_demo.py:38: AssertionError | ||||||
|     _______ TestSpecialisedExplanations.test_eq_text ________ |     _______ TestSpecialisedExplanations.test_eq_text ________ | ||||||
|  | @ -277,7 +277,7 @@ get on the terminal - we are working on that): | ||||||
|     E         ?           +++ |     E         ?           +++ | ||||||
|      |      | ||||||
|     failure_demo.py:90: AssertionError |     failure_demo.py:90: AssertionError | ||||||
|     _______ TestSpecialisedExplanations.test_not_in_text_single_long_term ________ |     ______ TestSpecialisedExplanations.test_not_in_text_single_long_term _______ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestSpecialisedExplanations object at 0xdeadbeef> |     self = <failure_demo.TestSpecialisedExplanations object at 0xdeadbeef> | ||||||
|      |      | ||||||
|  | @ -298,7 +298,7 @@ get on the terminal - we are working on that): | ||||||
|             i = Foo() |             i = Foo() | ||||||
|     >       assert i.b == 2 |     >       assert i.b == 2 | ||||||
|     E       assert 1 == 2 |     E       assert 1 == 2 | ||||||
|     E        +  where 1 = <failure_demo.Foo object at 0xdeadbeef>.b |     E        +  where 1 = <failure_demo.test_attribute.<locals>.Foo object at 0xdeadbeef>.b | ||||||
|      |      | ||||||
|     failure_demo.py:101: AssertionError |     failure_demo.py:101: AssertionError | ||||||
|     _______ test_attribute_instance ________ |     _______ test_attribute_instance ________ | ||||||
|  | @ -308,8 +308,8 @@ get on the terminal - we are working on that): | ||||||
|                 b = 1 |                 b = 1 | ||||||
|     >       assert Foo().b == 2 |     >       assert Foo().b == 2 | ||||||
|     E       assert 1 == 2 |     E       assert 1 == 2 | ||||||
|     E        +  where 1 = <failure_demo.Foo object at 0xdeadbeef>.b |     E        +  where 1 = <failure_demo.test_attribute_instance.<locals>.Foo object at 0xdeadbeef>.b | ||||||
|     E        +    where <failure_demo.Foo object at 0xdeadbeef> = <class 'failure_demo.Foo'>() |     E        +    where <failure_demo.test_attribute_instance.<locals>.Foo object at 0xdeadbeef> = <class 'failure_demo.test_attribute_instance.<locals>.Foo'>() | ||||||
|      |      | ||||||
|     failure_demo.py:107: AssertionError |     failure_demo.py:107: AssertionError | ||||||
|     _______ test_attribute_failure ________ |     _______ test_attribute_failure ________ | ||||||
|  | @ -323,9 +323,9 @@ get on the terminal - we are working on that): | ||||||
|     >       assert i.b == 2 |     >       assert i.b == 2 | ||||||
|      |      | ||||||
|     failure_demo.py:116:  |     failure_demo.py:116:  | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|      |      | ||||||
|     self = <failure_demo.Foo object at 0xdeadbeef> |     self = <failure_demo.test_attribute_failure.<locals>.Foo object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def _get_b(self): |         def _get_b(self): | ||||||
|     >       raise Exception('Failed to get attrib') |     >       raise Exception('Failed to get attrib') | ||||||
|  | @ -341,30 +341,30 @@ get on the terminal - we are working on that): | ||||||
|                 b = 2 |                 b = 2 | ||||||
|     >       assert Foo().b == Bar().b |     >       assert Foo().b == Bar().b | ||||||
|     E       assert 1 == 2 |     E       assert 1 == 2 | ||||||
|     E        +  where 1 = <failure_demo.Foo object at 0xdeadbeef>.b |     E        +  where 1 = <failure_demo.test_attribute_multiple.<locals>.Foo object at 0xdeadbeef>.b | ||||||
|     E        +    where <failure_demo.Foo object at 0xdeadbeef> = <class 'failure_demo.Foo'>() |     E        +    where <failure_demo.test_attribute_multiple.<locals>.Foo object at 0xdeadbeef> = <class 'failure_demo.test_attribute_multiple.<locals>.Foo'>() | ||||||
|     E        +  and   2 = <failure_demo.Bar object at 0xdeadbeef>.b |     E        +  and   2 = <failure_demo.test_attribute_multiple.<locals>.Bar object at 0xdeadbeef>.b | ||||||
|     E        +    where <failure_demo.Bar object at 0xdeadbeef> = <class 'failure_demo.Bar'>() |     E        +    where <failure_demo.test_attribute_multiple.<locals>.Bar object at 0xdeadbeef> = <class 'failure_demo.test_attribute_multiple.<locals>.Bar'>() | ||||||
|      |      | ||||||
|     failure_demo.py:124: AssertionError |     failure_demo.py:124: AssertionError | ||||||
|     _______ TestRaises.test_raises ________ |     _______ TestRaises.test_raises ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_raises(self): |         def test_raises(self): | ||||||
|             s = 'qwe' |             s = 'qwe' | ||||||
|     >       raises(TypeError, "int(s)") |     >       raises(TypeError, "int(s)") | ||||||
|      |      | ||||||
|     failure_demo.py:133:  |     failure_demo.py:133:  | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|      |      | ||||||
|     >   int(s) |     >   int(s) | ||||||
|     E   ValueError: invalid literal for int() with base 10: 'qwe' |     E   ValueError: invalid literal for int() with base 10: 'qwe' | ||||||
|      |      | ||||||
|     <0-codegen $PWD/_pytest/python.py:1091>:1: ValueError |     <0-codegen $PYTHON_PREFIX/lib/python3.4/site-packages/_pytest/python.py:1205>:1: ValueError | ||||||
|     _______ TestRaises.test_raises_doesnt ________ |     _______ TestRaises.test_raises_doesnt ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_raises_doesnt(self): |         def test_raises_doesnt(self): | ||||||
|     >       raises(IOError, "int('3')") |     >       raises(IOError, "int('3')") | ||||||
|  | @ -373,7 +373,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:136: Failed |     failure_demo.py:136: Failed | ||||||
|     _______ TestRaises.test_raise ________ |     _______ TestRaises.test_raise ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_raise(self): |         def test_raise(self): | ||||||
|     >       raise ValueError("demo error") |     >       raise ValueError("demo error") | ||||||
|  | @ -382,16 +382,16 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:139: ValueError |     failure_demo.py:139: ValueError | ||||||
|     _______ TestRaises.test_tupleerror ________ |     _______ TestRaises.test_tupleerror ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_tupleerror(self): |         def test_tupleerror(self): | ||||||
|     >       a,b = [1] |     >       a,b = [1] | ||||||
|     E       ValueError: need more than 1 value to unpack |     E       ValueError: need more than 1 value to unpack | ||||||
|      |      | ||||||
|     failure_demo.py:142: ValueError |     failure_demo.py:142: ValueError | ||||||
|     _______ TestRaises.test_reinterpret_fails_with_print_for_the_fun_of_it ________ |     ______ TestRaises.test_reinterpret_fails_with_print_for_the_fun_of_it ______ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_reinterpret_fails_with_print_for_the_fun_of_it(self): |         def test_reinterpret_fails_with_print_for_the_fun_of_it(self): | ||||||
|             l = [1,2,3] |             l = [1,2,3] | ||||||
|  | @ -400,15 +400,15 @@ get on the terminal - we are working on that): | ||||||
|     E       TypeError: 'int' object is not iterable |     E       TypeError: 'int' object is not iterable | ||||||
|      |      | ||||||
|     failure_demo.py:147: TypeError |     failure_demo.py:147: TypeError | ||||||
|     ----------------------------- Captured stdout call ----------------------------- |     --------------------------- Captured stdout call --------------------------- | ||||||
|     l is [1, 2, 3] |     l is [1, 2, 3] | ||||||
|     _______ TestRaises.test_some_error ________ |     _______ TestRaises.test_some_error ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestRaises instance at 0xdeadbeef> |     self = <failure_demo.TestRaises object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_some_error(self): |         def test_some_error(self): | ||||||
|     >       if namenotexi: |     >       if namenotexi: | ||||||
|     E       NameError: global name 'namenotexi' is not defined |     E       NameError: name 'namenotexi' is not defined | ||||||
|      |      | ||||||
|     failure_demo.py:150: NameError |     failure_demo.py:150: NameError | ||||||
|     _______ test_dynamic_compile_shows_nicely ________ |     _______ test_dynamic_compile_shows_nicely ________ | ||||||
|  | @ -423,16 +423,16 @@ get on the terminal - we are working on that): | ||||||
|     >       module.foo() |     >       module.foo() | ||||||
|      |      | ||||||
|     failure_demo.py:165:  |     failure_demo.py:165:  | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|      |      | ||||||
|         def foo(): |         def foo(): | ||||||
|     >    assert 1 == 0 |     >    assert 1 == 0 | ||||||
|     E    assert 1 == 0 |     E    assert 1 == 0 | ||||||
|      |      | ||||||
|     <2-codegen 'abc-123' $PWD/doc/en/example/assertion/failure_demo.py:162>:2: AssertionError |     <2-codegen 'abc-123' $REGENDOC_TMPDIR/assertion/failure_demo.py:162>:2: AssertionError | ||||||
|     _______ TestMoreErrors.test_complex_error ________ |     _______ TestMoreErrors.test_complex_error ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_complex_error(self): |         def test_complex_error(self): | ||||||
|             def f(): |             def f(): | ||||||
|  | @ -442,10 +442,10 @@ get on the terminal - we are working on that): | ||||||
|     >       somefunc(f(), g()) |     >       somefunc(f(), g()) | ||||||
|      |      | ||||||
|     failure_demo.py:175:  |     failure_demo.py:175:  | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|     failure_demo.py:8: in somefunc |     failure_demo.py:8: in somefunc | ||||||
|         otherfunc(x,y) |         otherfunc(x,y) | ||||||
|     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  | ||||||
|      |      | ||||||
|     a = 44, b = 43 |     a = 44, b = 43 | ||||||
|      |      | ||||||
|  | @ -456,7 +456,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:5: AssertionError |     failure_demo.py:5: AssertionError | ||||||
|     _______ TestMoreErrors.test_z1_unpack_error ________ |     _______ TestMoreErrors.test_z1_unpack_error ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_z1_unpack_error(self): |         def test_z1_unpack_error(self): | ||||||
|             l = [] |             l = [] | ||||||
|  | @ -466,7 +466,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:179: ValueError |     failure_demo.py:179: ValueError | ||||||
|     _______ TestMoreErrors.test_z2_type_error ________ |     _______ TestMoreErrors.test_z2_type_error ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_z2_type_error(self): |         def test_z2_type_error(self): | ||||||
|             l = 3 |             l = 3 | ||||||
|  | @ -476,7 +476,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:183: TypeError |     failure_demo.py:183: TypeError | ||||||
|     _______ TestMoreErrors.test_startswith ________ |     _______ TestMoreErrors.test_startswith ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_startswith(self): |         def test_startswith(self): | ||||||
|             s = "123" |             s = "123" | ||||||
|  | @ -488,7 +488,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:188: AssertionError |     failure_demo.py:188: AssertionError | ||||||
|     _______ TestMoreErrors.test_startswith_nested ________ |     _______ TestMoreErrors.test_startswith_nested ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_startswith_nested(self): |         def test_startswith_nested(self): | ||||||
|             def f(): |             def f(): | ||||||
|  | @ -498,13 +498,13 @@ get on the terminal - we are working on that): | ||||||
|     >       assert f().startswith(g()) |     >       assert f().startswith(g()) | ||||||
|     E       assert <built-in method startswith of str object at 0xdeadbeef>('456') |     E       assert <built-in method startswith of str object at 0xdeadbeef>('456') | ||||||
|     E        +  where <built-in method startswith of str object at 0xdeadbeef> = '123'.startswith |     E        +  where <built-in method startswith of str object at 0xdeadbeef> = '123'.startswith | ||||||
|     E        +    where '123' = <function f at 0xdeadbeef>() |     E        +    where '123' = <function TestMoreErrors.test_startswith_nested.<locals>.f at 0xdeadbeef>() | ||||||
|     E        +  and   '456' = <function g at 0xdeadbeef>() |     E        +  and   '456' = <function TestMoreErrors.test_startswith_nested.<locals>.g at 0xdeadbeef>() | ||||||
|      |      | ||||||
|     failure_demo.py:195: AssertionError |     failure_demo.py:195: AssertionError | ||||||
|     _______ TestMoreErrors.test_global_func ________ |     _______ TestMoreErrors.test_global_func ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_global_func(self): |         def test_global_func(self): | ||||||
|     >       assert isinstance(globf(42), float) |     >       assert isinstance(globf(42), float) | ||||||
|  | @ -514,18 +514,18 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:198: AssertionError |     failure_demo.py:198: AssertionError | ||||||
|     _______ TestMoreErrors.test_instance ________ |     _______ TestMoreErrors.test_instance ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_instance(self): |         def test_instance(self): | ||||||
|             self.x = 6*7 |             self.x = 6*7 | ||||||
|     >       assert self.x != 42 |     >       assert self.x != 42 | ||||||
|     E       assert 42 != 42 |     E       assert 42 != 42 | ||||||
|     E        +  where 42 = <failure_demo.TestMoreErrors instance at 0xdeadbeef>.x |     E        +  where 42 = <failure_demo.TestMoreErrors object at 0xdeadbeef>.x | ||||||
|      |      | ||||||
|     failure_demo.py:202: AssertionError |     failure_demo.py:202: AssertionError | ||||||
|     _______ TestMoreErrors.test_compare ________ |     _______ TestMoreErrors.test_compare ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_compare(self): |         def test_compare(self): | ||||||
|     >       assert globf(10) < 5 |     >       assert globf(10) < 5 | ||||||
|  | @ -535,7 +535,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:205: AssertionError |     failure_demo.py:205: AssertionError | ||||||
|     _______ TestMoreErrors.test_try_finally ________ |     _______ TestMoreErrors.test_try_finally ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestMoreErrors instance at 0xdeadbeef> |     self = <failure_demo.TestMoreErrors object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_try_finally(self): |         def test_try_finally(self): | ||||||
|             x = 1 |             x = 1 | ||||||
|  | @ -546,7 +546,7 @@ get on the terminal - we are working on that): | ||||||
|     failure_demo.py:210: AssertionError |     failure_demo.py:210: AssertionError | ||||||
|     _______ TestCustomAssertMsg.test_single_line ________ |     _______ TestCustomAssertMsg.test_single_line ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestCustomAssertMsg instance at 0xdeadbeef> |     self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_single_line(self): |         def test_single_line(self): | ||||||
|             class A: |             class A: | ||||||
|  | @ -555,12 +555,12 @@ get on the terminal - we are working on that): | ||||||
|     >       assert A.a == b, "A.a appears not to be b" |     >       assert A.a == b, "A.a appears not to be b" | ||||||
|     E       AssertionError: A.a appears not to be b |     E       AssertionError: A.a appears not to be b | ||||||
|     E       assert 1 == 2 |     E       assert 1 == 2 | ||||||
|     E        +  where 1 = <class failure_demo.A at 0xdeadbeef>.a |     E        +  where 1 = <class 'failure_demo.TestCustomAssertMsg.test_single_line.<locals>.A'>.a | ||||||
|      |      | ||||||
|     failure_demo.py:221: AssertionError |     failure_demo.py:221: AssertionError | ||||||
|     _______ TestCustomAssertMsg.test_multiline ________ |     _______ TestCustomAssertMsg.test_multiline ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestCustomAssertMsg instance at 0xdeadbeef> |     self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_multiline(self): |         def test_multiline(self): | ||||||
|             class A: |             class A: | ||||||
|  | @ -572,12 +572,12 @@ get on the terminal - we are working on that): | ||||||
|     E         or does not appear to be b |     E         or does not appear to be b | ||||||
|     E         one of those |     E         one of those | ||||||
|     E       assert 1 == 2 |     E       assert 1 == 2 | ||||||
|     E        +  where 1 = <class failure_demo.A at 0xdeadbeef>.a |     E        +  where 1 = <class 'failure_demo.TestCustomAssertMsg.test_multiline.<locals>.A'>.a | ||||||
|      |      | ||||||
|     failure_demo.py:227: AssertionError |     failure_demo.py:227: AssertionError | ||||||
|     _______ TestCustomAssertMsg.test_custom_repr ________ |     _______ TestCustomAssertMsg.test_custom_repr ________ | ||||||
|      |      | ||||||
|     self = <failure_demo.TestCustomAssertMsg instance at 0xdeadbeef> |     self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_custom_repr(self): |         def test_custom_repr(self): | ||||||
|             class JSON: |             class JSON: | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ Let's run this without supplying our new option:: | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_sample.py:6: AssertionError |     test_sample.py:6: AssertionError | ||||||
|     ----------------------------- Captured stdout call ----------------------------- |     --------------------------- Captured stdout call --------------------------- | ||||||
|     first |     first | ||||||
|     1 failed in 0.12 seconds |     1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
|  | @ -75,7 +75,7 @@ And now with supplying a command line option:: | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_sample.py:6: AssertionError |     test_sample.py:6: AssertionError | ||||||
|     ----------------------------- Captured stdout call ----------------------------- |     --------------------------- Captured stdout call --------------------------- | ||||||
|     second |     second | ||||||
|     1 failed in 0.12 seconds |     1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
|  | @ -108,7 +108,7 @@ directory with the above conftest.py:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 0 items |     collected 0 items | ||||||
|      |      | ||||||
|  | @ -153,7 +153,7 @@ and when running it will see a skipped "slow" test:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -rs    # "-rs" means report details on the little 's' |     $ py.test -rs    # "-rs" means report details on the little 's' | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -167,7 +167,7 @@ Or run it including the ``slow`` marked test:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --runslow |     $ py.test --runslow | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -259,7 +259,7 @@ which will add the string to the test header accordingly:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     project deps: mylib-1.1 |     project deps: mylib-1.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 0 items |     collected 0 items | ||||||
|  | @ -283,7 +283,8 @@ which will add info only when run with "--v":: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v |     $ py.test -v | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     info1: did you know that ... |     info1: did you know that ... | ||||||
|     did you? |     did you? | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|  | @ -295,7 +296,7 @@ and nothing when run plainly:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 0 items |     collected 0 items | ||||||
|      |      | ||||||
|  | @ -328,7 +329,7 @@ Now we can profile which test functions execute the slowest:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --durations=3 |     $ py.test --durations=3 | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 3 items |     collected 3 items | ||||||
|      |      | ||||||
|  | @ -390,7 +391,7 @@ If we run this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -rx |     $ py.test -rx | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 4 items |     collected 4 items | ||||||
|      |      | ||||||
|  | @ -399,7 +400,7 @@ If we run this:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ TestUserHandling.test_modification ________ |     _______ TestUserHandling.test_modification ________ | ||||||
|      |      | ||||||
|     self = <test_step.TestUserHandling instance at 0xdeadbeef> |     self = <test_step.TestUserHandling object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_modification(self): |         def test_modification(self): | ||||||
|     >       assert 0 |     >       assert 0 | ||||||
|  | @ -461,7 +462,7 @@ We can run this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 7 items |     collected 7 items | ||||||
|      |      | ||||||
|  | @ -475,14 +476,14 @@ We can run this:: | ||||||
|     file $REGENDOC_TMPDIR/b/test_error.py, line 1 |     file $REGENDOC_TMPDIR/b/test_error.py, line 1 | ||||||
|       def test_root(db):  # no db here, will error out |       def test_root(db):  # no db here, will error out | ||||||
|             fixture 'db' not found |             fixture 'db' not found | ||||||
|             available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir |             available fixtures: cache, record_xml_property, pytestconfig, tmpdir_factory, monkeypatch, capsys, recwarn, tmpdir, capfd | ||||||
|             use 'py.test --fixtures [testpath]' for help on them. |             use 'py.test --fixtures [testpath]' for help on them. | ||||||
|      |      | ||||||
|     $REGENDOC_TMPDIR/b/test_error.py:1 |     $REGENDOC_TMPDIR/b/test_error.py:1 | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ TestUserHandling.test_modification ________ |     _______ TestUserHandling.test_modification ________ | ||||||
|      |      | ||||||
|     self = <test_step.TestUserHandling instance at 0xdeadbeef> |     self = <test_step.TestUserHandling object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_modification(self): |         def test_modification(self): | ||||||
|     >       assert 0 |     >       assert 0 | ||||||
|  | @ -491,21 +492,21 @@ We can run this:: | ||||||
|     test_step.py:9: AssertionError |     test_step.py:9: AssertionError | ||||||
|     _______ test_a1 ________ |     _______ test_a1 ________ | ||||||
|      |      | ||||||
|     db = <conftest.DB instance at 0xdeadbeef> |     db = <conftest.DB object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_a1(db): |         def test_a1(db): | ||||||
|     >       assert 0, db  # to show value |     >       assert 0, db  # to show value | ||||||
|     E       AssertionError: <conftest.DB instance at 0xdeadbeef> |     E       AssertionError: <conftest.DB object at 0xdeadbeef> | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     a/test_db.py:2: AssertionError |     a/test_db.py:2: AssertionError | ||||||
|     _______ test_a2 ________ |     _______ test_a2 ________ | ||||||
|      |      | ||||||
|     db = <conftest.DB instance at 0xdeadbeef> |     db = <conftest.DB object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_a2(db): |         def test_a2(db): | ||||||
|     >       assert 0, db  # to show value |     >       assert 0, db  # to show value | ||||||
|     E       AssertionError: <conftest.DB instance at 0xdeadbeef> |     E       AssertionError: <conftest.DB object at 0xdeadbeef> | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     a/test_db2.py:2: AssertionError |     a/test_db2.py:2: AssertionError | ||||||
|  | @ -565,7 +566,7 @@ and run them:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_module.py |     $ py.test test_module.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -574,7 +575,7 @@ and run them:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_fail1 ________ |     _______ test_fail1 ________ | ||||||
|      |      | ||||||
|     tmpdir = local('/tmp/pytest-NaN/test_fail10') |     tmpdir = local('PYTEST_TMPDIR/test_fail10') | ||||||
|      |      | ||||||
|         def test_fail1(tmpdir): |         def test_fail1(tmpdir): | ||||||
|     >       assert 0 |     >       assert 0 | ||||||
|  | @ -593,7 +594,8 @@ and run them:: | ||||||
| you will have a "failures" file which contains the failing test ids:: | you will have a "failures" file which contains the failing test ids:: | ||||||
| 
 | 
 | ||||||
|     $ cat failures |     $ cat failures | ||||||
|     cat: failures: No such file or directory |     test_module.py::test_fail1 (PYTEST_TMPDIR/test_fail10) | ||||||
|  |     test_module.py::test_fail2 | ||||||
| 
 | 
 | ||||||
| Making test result information available in fixtures | Making test result information available in fixtures | ||||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ||||||
|  | @ -655,12 +657,12 @@ and run it:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -s test_module.py |     $ py.test -s test_module.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 3 items |     collected 3 items | ||||||
|      |      | ||||||
|     test_module.py E('setting up a test failed!', 'test_module.py::test_setup_fails') |     test_module.py Esetting up a test failed! test_module.py::test_setup_fails | ||||||
|     F('executing test failed', 'test_module.py::test_call_fails') |     Fexecuting test failed test_module.py::test_call_fails | ||||||
|     F |     F | ||||||
|      |      | ||||||
|     ======= ERRORS ======== |     ======= ERRORS ======== | ||||||
|  | @ -689,7 +691,7 @@ and run it:: | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_module.py:15: AssertionError |     test_module.py:15: AssertionError | ||||||
|     ======= 2 failed, 1 warnings, 1 error in 0.12 seconds ======== |     ======= 2 failed, 1 error in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| You'll see that the fixture finalizers could use the precise reporting | You'll see that the fixture finalizers could use the precise reporting | ||||||
| information. | information. | ||||||
|  |  | ||||||
|  | @ -75,7 +75,7 @@ marked ``smtp`` fixture function.  Running the test looks like this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_smtpsimple.py |     $ py.test test_smtpsimple.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -84,7 +84,7 @@ marked ``smtp`` fixture function.  Running the test looks like this:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_ehlo ________ |     _______ test_ehlo ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_ehlo(smtp): |         def test_ehlo(smtp): | ||||||
|             response, msg = smtp.ehlo() |             response, msg = smtp.ehlo() | ||||||
|  | @ -180,7 +180,7 @@ function (in or below the directory where ``conftest.py`` is located):: | ||||||
|     def test_ehlo(smtp): |     def test_ehlo(smtp): | ||||||
|         response, msg = smtp.ehlo() |         response, msg = smtp.ehlo() | ||||||
|         assert response == 250 |         assert response == 250 | ||||||
|         assert "smtp.gmail.com" in str(msg, 'ascii') |         assert b"smtp.gmail.com" in msg | ||||||
|         assert 0  # for demo purposes    |         assert 0  # for demo purposes    | ||||||
| 
 | 
 | ||||||
|     def test_noop(smtp): |     def test_noop(smtp): | ||||||
|  | @ -193,7 +193,7 @@ inspect what is going on and can now run the tests:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_module.py |     $ py.test test_module.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -202,23 +202,23 @@ inspect what is going on and can now run the tests:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_ehlo ________ |     _______ test_ehlo ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_ehlo(smtp): |         def test_ehlo(smtp): | ||||||
|             response = smtp.ehlo() |             response, msg = smtp.ehlo() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|             assert "merlinux" in response[1] |             assert b"smtp.gmail.com" in msg | ||||||
|     >       assert 0  # for demo purposes |     >       assert 0  # for demo purposes | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_module.py:6: AssertionError |     test_module.py:6: AssertionError | ||||||
|     _______ test_noop ________ |     _______ test_noop ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_noop(smtp): |         def test_noop(smtp): | ||||||
|             response = smtp.noop() |             response, msg = smtp.noop() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|     >       assert 0  # for demo purposes |     >       assert 0  # for demo purposes | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|  | @ -243,7 +243,7 @@ instance, you can simply declare it: | ||||||
| 
 | 
 | ||||||
| .. _`finalization`: | .. _`finalization`: | ||||||
| 
 | 
 | ||||||
| fixture finalization / executing teardown code | Fixture finalization / executing teardown code | ||||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| pytest supports execution of fixture specific finalization code | pytest supports execution of fixture specific finalization code | ||||||
|  | @ -313,7 +313,7 @@ We use the ``request.module`` attribute to optionally obtain an | ||||||
| again, nothing much has changed:: | again, nothing much has changed:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -s -q --tb=no |     $ py.test -s -q --tb=no | ||||||
|     FFteardown smtp |     FFfinalizing <smtplib.SMTP object at 0xdeadbeef> (smtp.gmail.com) | ||||||
|      |      | ||||||
|     2 failed in 0.12 seconds |     2 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
|  | @ -335,7 +335,7 @@ Running it:: | ||||||
|     _______ test_showhelo ________ |     _______ test_showhelo ________ | ||||||
|     test_anothersmtp.py:5: in test_showhelo |     test_anothersmtp.py:5: in test_showhelo | ||||||
|         assert 0, smtp.helo() |         assert 0, smtp.helo() | ||||||
|     E   AssertionError: (250, 'hq.merlinux.eu') |     E   AssertionError: (250, b'mail.python.org') | ||||||
|     E   assert 0 |     E   assert 0 | ||||||
| 
 | 
 | ||||||
| voila! The ``smtp`` fixture function picked up our mail server name | voila! The ``smtp`` fixture function picked up our mail server name | ||||||
|  | @ -381,49 +381,49 @@ So let's just do another run:: | ||||||
|     $ py.test -q test_module.py |     $ py.test -q test_module.py | ||||||
|     FFFF |     FFFF | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_ehlo[merlinux.eu] ________ |     _______ test_ehlo[smtp.gmail.com] ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_ehlo(smtp): |         def test_ehlo(smtp): | ||||||
|             response = smtp.ehlo() |             response, msg = smtp.ehlo() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|             assert "merlinux" in response[1] |             assert b"smtp.gmail.com" in msg | ||||||
|     >       assert 0  # for demo purposes |     >       assert 0  # for demo purposes | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_module.py:6: AssertionError |     test_module.py:6: AssertionError | ||||||
|     _______ test_noop[merlinux.eu] ________ |     _______ test_noop[smtp.gmail.com] ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_noop(smtp): |         def test_noop(smtp): | ||||||
|             response = smtp.noop() |             response, msg = smtp.noop() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|     >       assert 0  # for demo purposes |     >       assert 0  # for demo purposes | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_module.py:11: AssertionError |     test_module.py:11: AssertionError | ||||||
|     _______ test_ehlo[mail.python.org] ________ |     _______ test_ehlo[mail.python.org] ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_ehlo(smtp): |         def test_ehlo(smtp): | ||||||
|             response = smtp.ehlo() |             response, msg = smtp.ehlo() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|     >       assert "merlinux" in response[1] |     >       assert b"smtp.gmail.com" in msg | ||||||
|     E       assert 'merlinux' in 'mail.python.org\nSIZE 51200000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' |     E       assert b'smtp.gmail.com' in b'mail.python.org\nSIZE 51200000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' | ||||||
|      |      | ||||||
|     test_module.py:5: AssertionError |     test_module.py:5: AssertionError | ||||||
|     ---------------------------- Captured stdout setup ----------------------------- |     -------------------------- Captured stdout setup --------------------------- | ||||||
|     finalizing <smtplib.SMTP instance at 0xdeadbeef> |     finalizing <smtplib.SMTP object at 0xdeadbeef> | ||||||
|     _______ test_noop[mail.python.org] ________ |     _______ test_noop[mail.python.org] ________ | ||||||
|      |      | ||||||
|     smtp = <smtplib.SMTP instance at 0xdeadbeef> |     smtp = <smtplib.SMTP object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_noop(smtp): |         def test_noop(smtp): | ||||||
|             response = smtp.noop() |             response, msg = smtp.noop() | ||||||
|             assert response[0] == 250 |             assert response == 250 | ||||||
|     >       assert 0  # for demo purposes |     >       assert 0  # for demo purposes | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|  | @ -480,15 +480,20 @@ Running the above tests results in the following test IDs being used:: | ||||||
| 
 | 
 | ||||||
|    $ py.test --collect-only |    $ py.test --collect-only | ||||||
|    ======= test session starts ======== |    ======= test session starts ======== | ||||||
|    platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |    platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|    rootdir: $REGENDOC_TMPDIR, inifile:  |    rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|    collected 6 items |    collected 10 items | ||||||
|    <Module 'test_anothersmtp.py'> |    <Module 'test_anothersmtp.py'> | ||||||
|      <Function 'test_showhelo[merlinux.eu]'> |      <Function 'test_showhelo[smtp.gmail.com]'> | ||||||
|      <Function 'test_showhelo[mail.python.org]'> |      <Function 'test_showhelo[mail.python.org]'> | ||||||
|  |    <Module 'test_ids.py'> | ||||||
|  |      <Function 'test_a[spam]'> | ||||||
|  |      <Function 'test_a[ham]'> | ||||||
|  |      <Function 'test_b[eggs]'> | ||||||
|  |      <Function 'test_b[1]'> | ||||||
|    <Module 'test_module.py'> |    <Module 'test_module.py'> | ||||||
|      <Function 'test_ehlo[merlinux.eu]'> |      <Function 'test_ehlo[smtp.gmail.com]'> | ||||||
|      <Function 'test_noop[merlinux.eu]'> |      <Function 'test_noop[smtp.gmail.com]'> | ||||||
|      <Function 'test_ehlo[mail.python.org]'> |      <Function 'test_ehlo[mail.python.org]'> | ||||||
|      <Function 'test_noop[mail.python.org]'> |      <Function 'test_noop[mail.python.org]'> | ||||||
|     |     | ||||||
|  | @ -526,11 +531,12 @@ Here we declare an ``app`` fixture which receives the previously defined | ||||||
| 
 | 
 | ||||||
|     $ py.test -v test_appsetup.py |     $ py.test -v test_appsetup.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 2 items |     collecting ... collected 2 items | ||||||
|      |      | ||||||
|     test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED |     test_appsetup.py::test_smtp_exists[smtp.gmail.com] PASSED | ||||||
|     test_appsetup.py::test_smtp_exists[mail.python.org] PASSED |     test_appsetup.py::test_smtp_exists[mail.python.org] PASSED | ||||||
|      |      | ||||||
|     ======= 2 passed in 0.12 seconds ======== |     ======= 2 passed in 0.12 seconds ======== | ||||||
|  | @ -591,27 +597,28 @@ Let's run the tests in verbose mode and with looking at the print-output:: | ||||||
| 
 | 
 | ||||||
|     $ py.test -v -s test_module.py |     $ py.test -v -s test_module.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 -- $PWD/.env/bin/python2.7 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 -- $PYTHON_PREFIX/bin/python3.4 | ||||||
|  |     cachedir: .cache | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collecting ... collected 8 items |     collecting ... collected 8 items | ||||||
|      |      | ||||||
|     test_module.py::test_0[1] ('  test0', 1) |     test_module.py::test_0[1]   test0 1 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_0[2] ('  test0', 2) |     test_module.py::test_0[2]   test0 2 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_1[mod1] ('create', 'mod1') |     test_module.py::test_1[mod1] create mod1 | ||||||
|     ('  test1', 'mod1') |       test1 mod1 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_2[1-mod1] ('  test2', 1, 'mod1') |     test_module.py::test_2[1-mod1]   test2 1 mod1 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_2[2-mod1] ('  test2', 2, 'mod1') |     test_module.py::test_2[2-mod1]   test2 2 mod1 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_1[mod2] ('create', 'mod2') |     test_module.py::test_1[mod2] create mod2 | ||||||
|     ('  test1', 'mod2') |       test1 mod2 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_2[1-mod2] ('  test2', 1, 'mod2') |     test_module.py::test_2[1-mod2]   test2 1 mod2 | ||||||
|     PASSED |     PASSED | ||||||
|     test_module.py::test_2[2-mod2] ('  test2', 2, 'mod2') |     test_module.py::test_2[2-mod2]   test2 2 mod2 | ||||||
|     PASSED |     PASSED | ||||||
|      |      | ||||||
|     ======= 8 passed in 0.12 seconds ======== |     ======= 8 passed in 0.12 seconds ======== | ||||||
|  | @ -623,7 +630,7 @@ before the ``mod2`` resource was setup. | ||||||
| 
 | 
 | ||||||
| .. _`usefixtures`: | .. _`usefixtures`: | ||||||
| 
 | 
 | ||||||
| using fixtures from classes, modules or projects | Using fixtures from classes, modules or projects | ||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| .. regendoc:wipe | .. regendoc:wipe | ||||||
|  | @ -685,6 +692,9 @@ a generic feature of the mark mechanism: | ||||||
| 
 | 
 | ||||||
|     pytestmark = pytest.mark.usefixtures("cleandir") |     pytestmark = pytest.mark.usefixtures("cleandir") | ||||||
| 
 | 
 | ||||||
|  | Note that the assigned variable *must* be called ``pytestmark``, assigning e.g. | ||||||
|  | ``foomark`` will not activate the fixtures. | ||||||
|  | 
 | ||||||
| Lastly you can put fixtures required by all tests in your project | Lastly you can put fixtures required by all tests in your project | ||||||
| into an ini-file: | into an ini-file: | ||||||
| 
 | 
 | ||||||
|  | @ -698,7 +708,7 @@ into an ini-file: | ||||||
| .. _`autouse`: | .. _`autouse`: | ||||||
| .. _`autouse fixtures`: | .. _`autouse fixtures`: | ||||||
| 
 | 
 | ||||||
| autouse fixtures (xUnit setup on steroids) | Autouse fixtures (xUnit setup on steroids) | ||||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| .. regendoc:wipe | .. regendoc:wipe | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ Installation options:: | ||||||
| To check your installation has installed the correct version:: | To check your installation has installed the correct version:: | ||||||
| 
 | 
 | ||||||
|     $ py.test --version |     $ py.test --version | ||||||
|     This is pytest version 2.8.0.dev4, imported from $PWD/pytest.pyc |     This is pytest version 2.8.1.dev1, imported from $PYTHON_PREFIX/lib/python3.4/site-packages/pytest.py | ||||||
| 
 | 
 | ||||||
| If you get an error checkout :ref:`installation issues`. | If you get an error checkout :ref:`installation issues`. | ||||||
| 
 | 
 | ||||||
|  | @ -49,7 +49,7 @@ That's it. You can execute the test function now:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -66,7 +66,7 @@ That's it. You can execute the test function now:: | ||||||
|     test_sample.py:5: AssertionError |     test_sample.py:5: AssertionError | ||||||
|     ======= 1 failed in 0.12 seconds ======== |     ======= 1 failed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| ``pytest`` found the ``test_answer`` function by following :ref:`standard test discovery rules <test discovery>`, basically detecting the ``test_`` prefixes.  We got a failure report because our little ``func(3)`` call did not return ``5``. | We got a failure report because our little ``func(3)`` call did not return ``5``. | ||||||
| 
 | 
 | ||||||
| .. note:: | .. note:: | ||||||
| 
 | 
 | ||||||
|  | @ -79,6 +79,12 @@ That's it. You can execute the test function now:: | ||||||
| 
 | 
 | ||||||
| .. _`assert statement`: http://docs.python.org/reference/simple_stmts.html#the-assert-statement | .. _`assert statement`: http://docs.python.org/reference/simple_stmts.html#the-assert-statement | ||||||
| 
 | 
 | ||||||
|  | Running multiple tests | ||||||
|  | ---------------------------------------------------------- | ||||||
|  | 
 | ||||||
|  | ``pytest`` will run all files in the current directory and its subdirectories of the form test_*.py or \*_test.py. More generally, it follows :ref:`standard test discovery rules <test discovery>`. | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| Asserting that a certain exception is raised | Asserting that a certain exception is raised | ||||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
|  | @ -128,7 +134,7 @@ run the module by passing its filename:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ TestClass.test_two ________ |     _______ TestClass.test_two ________ | ||||||
|      |      | ||||||
|     self = <test_class.TestClass instance at 0xdeadbeef> |     self = <test_class.TestClass object at 0xdeadbeef> | ||||||
|      |      | ||||||
|         def test_two(self): |         def test_two(self): | ||||||
|             x = "hello" |             x = "hello" | ||||||
|  | @ -164,7 +170,7 @@ before performing the test function call.  Let's just run it:: | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_needsfiles ________ |     _______ test_needsfiles ________ | ||||||
|      |      | ||||||
|     tmpdir = local('/tmp/pytest-NaN/test_needsfiles0') |     tmpdir = local('PYTEST_TMPDIR/test_needsfiles0') | ||||||
|      |      | ||||||
|         def test_needsfiles(tmpdir): |         def test_needsfiles(tmpdir): | ||||||
|             print (tmpdir) |             print (tmpdir) | ||||||
|  | @ -172,8 +178,8 @@ before performing the test function call.  Let's just run it:: | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_tmpdir.py:3: AssertionError |     test_tmpdir.py:3: AssertionError | ||||||
|     ----------------------------- Captured stdout call ----------------------------- |     --------------------------- Captured stdout call --------------------------- | ||||||
|     /tmp/pytest-NaN/test_needsfiles0 |     PYTEST_TMPDIR/test_needsfiles0 | ||||||
|     1 failed in 0.12 seconds |     1 failed in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| Before the test runs, a unique-per-test-invocation temporary directory | Before the test runs, a unique-per-test-invocation temporary directory | ||||||
|  |  | ||||||
|  | @ -55,7 +55,7 @@ them in turn:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 3 items |     collected 3 items | ||||||
|      |      | ||||||
|  | @ -103,7 +103,7 @@ Let's run this:: | ||||||
| 
 | 
 | ||||||
|     $ py.test |     $ py.test | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 3 items |     collected 3 items | ||||||
|      |      | ||||||
|  | @ -201,7 +201,7 @@ listlist:: | ||||||
|     $ py.test -q -rs test_strings.py |     $ py.test -q -rs test_strings.py | ||||||
|     s |     s | ||||||
|     ======= short test summary info ======== |     ======= short test summary info ======== | ||||||
|     SKIP [1] $PWD/_pytest/python.py:1201: got empty parameter set, function test_valid_string at $REGENDOC_TMPDIR/test_strings.py:1 |     SKIP [1] $PYTHON_PREFIX/lib/python3.4/site-packages/_pytest/python.py:1322: got empty parameter set, function test_valid_string at $REGENDOC_TMPDIR/test_strings.py:1 | ||||||
|     1 skipped in 0.12 seconds |     1 skipped in 0.12 seconds | ||||||
| 
 | 
 | ||||||
| For further examples, you might want to look at :ref:`more | For further examples, you might want to look at :ref:`more | ||||||
|  |  | ||||||
|  | @ -113,8 +113,8 @@ how to obtain the name of a plugin. | ||||||
| 
 | 
 | ||||||
| .. _`builtin plugins`: | .. _`builtin plugins`: | ||||||
| 
 | 
 | ||||||
| pytest default plugin reference | Pytest default plugin reference | ||||||
| =============================== | ------------------------------- | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| You can find the source code for the following plugins | You can find the source code for the following plugins | ||||||
|  |  | ||||||
|  | @ -165,8 +165,8 @@ Running it with the report-on-xfail option gives this output:: | ||||||
| 
 | 
 | ||||||
|     example $ py.test -rx xfail_demo.py |     example $ py.test -rx xfail_demo.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $PWD/doc/en, inifile: pytest.ini |     rootdir: $REGENDOC_TMPDIR/example, inifile:  | ||||||
|     collected 7 items |     collected 7 items | ||||||
|      |      | ||||||
|     xfail_demo.py xxxxxxx |     xfail_demo.py xxxxxxx | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ Running this would result in a passed test except for the last | ||||||
| 
 | 
 | ||||||
|     $ py.test test_tmpdir.py |     $ py.test test_tmpdir.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 1 items |     collected 1 items | ||||||
|      |      | ||||||
|  | @ -38,7 +38,7 @@ Running this would result in a passed test except for the last | ||||||
|     ======= FAILURES ======== |     ======= FAILURES ======== | ||||||
|     _______ test_create_file ________ |     _______ test_create_file ________ | ||||||
|      |      | ||||||
|     tmpdir = local('/tmp/pytest-NaN/test_create_file0') |     tmpdir = local('PYTEST_TMPDIR/test_create_file0') | ||||||
|      |      | ||||||
|         def test_create_file(tmpdir): |         def test_create_file(tmpdir): | ||||||
|             p = tmpdir.mkdir("sub").join("hello.txt") |             p = tmpdir.mkdir("sub").join("hello.txt") | ||||||
|  | @ -51,7 +51,6 @@ Running this would result in a passed test except for the last | ||||||
|     test_tmpdir.py:7: AssertionError |     test_tmpdir.py:7: AssertionError | ||||||
|     ======= 1 failed in 0.12 seconds ======== |     ======= 1 failed in 0.12 seconds ======== | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| The 'tmpdir_factory' fixture | The 'tmpdir_factory' fixture | ||||||
| ---------------------------- | ---------------------------- | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -88,7 +88,7 @@ the ``self.db`` values in the traceback:: | ||||||
| 
 | 
 | ||||||
|     $ py.test test_unittest_db.py |     $ py.test test_unittest_db.py | ||||||
|     ======= test session starts ======== |     ======= test session starts ======== | ||||||
|     platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0 |     platform linux -- Python 3.4.2, pytest-2.8.1.dev1, py-1.4.30, pluggy-0.3.1 | ||||||
|     rootdir: $REGENDOC_TMPDIR, inifile:  |     rootdir: $REGENDOC_TMPDIR, inifile:  | ||||||
|     collected 2 items |     collected 2 items | ||||||
|      |      | ||||||
|  | @ -102,7 +102,7 @@ the ``self.db`` values in the traceback:: | ||||||
|         def test_method1(self): |         def test_method1(self): | ||||||
|             assert hasattr(self, "db") |             assert hasattr(self, "db") | ||||||
|     >       assert 0, self.db   # fail for demo purposes |     >       assert 0, self.db   # fail for demo purposes | ||||||
|     E       AssertionError: <conftest.DummyDB instance at 0xdeadbeef> |     E       AssertionError: <conftest.db_class.<locals>.DummyDB object at 0xdeadbeef> | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_unittest_db.py:9: AssertionError |     test_unittest_db.py:9: AssertionError | ||||||
|  | @ -112,7 +112,7 @@ the ``self.db`` values in the traceback:: | ||||||
|      |      | ||||||
|         def test_method2(self): |         def test_method2(self): | ||||||
|     >       assert 0, self.db   # fail for demo purposes |     >       assert 0, self.db   # fail for demo purposes | ||||||
|     E       AssertionError: <conftest.DummyDB instance at 0xdeadbeef> |     E       AssertionError: <conftest.db_class.<locals>.DummyDB object at 0xdeadbeef> | ||||||
|     E       assert 0 |     E       assert 0 | ||||||
|      |      | ||||||
|     test_unittest_db.py:12: AssertionError |     test_unittest_db.py:12: AssertionError | ||||||
|  |  | ||||||
|  | @ -186,6 +186,8 @@ This will add an extra property ``example_key="1"`` to the generated | ||||||
|     by something more powerful and general in future versions. The |     by something more powerful and general in future versions. The | ||||||
|     functionality per-se will be kept, however. |     functionality per-se will be kept, however. | ||||||
| 
 | 
 | ||||||
|  |     Currently it does not work when used with the ``pytest-xdist`` plugin. | ||||||
|  | 
 | ||||||
|     Also please note that using this feature will break any schema verification. |     Also please note that using this feature will break any schema verification. | ||||||
|     This might be a problem when used with some CI servers. |     This might be a problem when used with some CI servers. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,8 @@ from xml.dom import minidom | ||||||
| from _pytest.main import EXIT_NOTESTSCOLLECTED | from _pytest.main import EXIT_NOTESTSCOLLECTED | ||||||
| import py, sys, os | import py, sys, os | ||||||
| from _pytest.junitxml import LogXML | from _pytest.junitxml import LogXML | ||||||
|  | import pytest | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| def runandparse(testdir, *args): | def runandparse(testdir, *args): | ||||||
|     resultpath = testdir.tmpdir.join("junit.xml") |     resultpath = testdir.tmpdir.join("junit.xml") | ||||||
|  | @ -553,6 +555,7 @@ def test_unicode_issue368(testdir): | ||||||
|     log.append_skipped(report) |     log.append_skipped(report) | ||||||
|     log.pytest_sessionfinish() |     log.pytest_sessionfinish() | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| def test_record_property(testdir): | def test_record_property(testdir): | ||||||
|     testdir.makepyfile(""" |     testdir.makepyfile(""" | ||||||
|         def test_record(record_xml_property): |         def test_record(record_xml_property): | ||||||
|  | @ -565,3 +568,25 @@ def test_record_property(testdir): | ||||||
|     pnode = psnode.getElementsByTagName('property')[0] |     pnode = psnode.getElementsByTagName('property')[0] | ||||||
|     assert_attr(pnode, name="foo", value="<1") |     assert_attr(pnode, name="foo", value="<1") | ||||||
|     result.stdout.fnmatch_lines('*C3*test_record_property.py*experimental*') |     result.stdout.fnmatch_lines('*C3*test_record_property.py*experimental*') | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def test_random_report_log_xdist(testdir): | ||||||
|  |     """xdist calls pytest_runtest_logreport as they are executed by the slaves, | ||||||
|  |     with nodes from several nodes overlapping, so junitxml must cope with that | ||||||
|  |     to produce correct reports. #1064 | ||||||
|  |     """ | ||||||
|  |     pytest.importorskip('xdist') | ||||||
|  |     testdir.makepyfile(""" | ||||||
|  |         import pytest, time | ||||||
|  |         @pytest.mark.parametrize('i', list(range(30))) | ||||||
|  |         def test_x(i): | ||||||
|  |             assert i != 22 | ||||||
|  |     """) | ||||||
|  |     _, dom = runandparse(testdir, '-n2') | ||||||
|  |     suite_node = dom.getElementsByTagName("testsuite")[0] | ||||||
|  |     failed = [] | ||||||
|  |     for case_node in suite_node.getElementsByTagName("testcase"): | ||||||
|  |         if case_node.getElementsByTagName('failure'): | ||||||
|  |             failed.append(case_node.getAttributeNode('name').value) | ||||||
|  | 
 | ||||||
|  |     assert failed == ['test_x[22]'] | ||||||
|  |  | ||||||
							
								
								
									
										16
									
								
								tox.ini
								
								
								
								
							
							
						
						
									
										16
									
								
								tox.ini
								
								
								
								
							|  | @ -3,7 +3,7 @@ minversion=2.0 | ||||||
| distshare={homedir}/.tox/distshare | distshare={homedir}/.tox/distshare | ||||||
| envlist= | envlist= | ||||||
|      flakes,py26,py27,py33,py34,py35,pypy, |      flakes,py26,py27,py33,py34,py35,pypy, | ||||||
|      {py27,py34}-{pexpect,xdist,trial}, |      {py27,py35}-{pexpect,xdist,trial}, | ||||||
|      py27-nobyte,doctesting,py27-cxfreeze |      py27-nobyte,doctesting,py27-cxfreeze | ||||||
| 
 | 
 | ||||||
| [testenv] | [testenv] | ||||||
|  | @ -43,7 +43,7 @@ deps=pytest-xdist>=1.13 | ||||||
| commands= | commands= | ||||||
|   py.test -n1 -rfsxX {posargs:testing} |   py.test -n1 -rfsxX {posargs:testing} | ||||||
| 
 | 
 | ||||||
| [testenv:py34-xdist] | [testenv:py35-xdist] | ||||||
| deps={[testenv:py27-xdist]deps} | deps={[testenv:py27-xdist]deps} | ||||||
| commands= | commands= | ||||||
|   py.test -n3 -rfsxX {posargs:testing} |   py.test -n3 -rfsxX {posargs:testing} | ||||||
|  | @ -55,7 +55,7 @@ deps=pexpect | ||||||
| commands= | commands= | ||||||
|   py.test -rfsxX test_pdb.py test_terminal.py test_unittest.py |   py.test -rfsxX test_pdb.py test_terminal.py test_unittest.py | ||||||
| 
 | 
 | ||||||
| [testenv:py34-pexpect] | [testenv:py35-pexpect] | ||||||
| changedir=testing | changedir=testing | ||||||
| platform=linux|darwin | platform=linux|darwin | ||||||
| deps={[testenv:py27-pexpect]deps} | deps={[testenv:py27-pexpect]deps} | ||||||
|  | @ -75,8 +75,7 @@ deps=twisted | ||||||
| commands= | commands= | ||||||
|   py.test -rsxf {posargs:testing/test_unittest.py} |   py.test -rsxf {posargs:testing/test_unittest.py} | ||||||
| 
 | 
 | ||||||
| [testenv:py34-trial] | [testenv:py35-trial] | ||||||
| # py34-trial does not work |  | ||||||
| platform=linux|darwin | platform=linux|darwin | ||||||
| deps={[testenv:py27-trial]deps} | deps={[testenv:py27-trial]deps} | ||||||
| commands= | commands= | ||||||
|  | @ -105,12 +104,15 @@ commands= py.test -rfsxX {posargs} | ||||||
| 
 | 
 | ||||||
| [testenv:regen] | [testenv:regen] | ||||||
| changedir=doc/en | changedir=doc/en | ||||||
|  | basepython = python3.4 | ||||||
| deps=sphinx | deps=sphinx | ||||||
|      PyYAML |      PyYAML | ||||||
| whitelist_externals=rm      |      regendoc>=0.6.1 | ||||||
|  | whitelist_externals= | ||||||
|  |     rm | ||||||
|  |     make | ||||||
| commands= | commands= | ||||||
|     rm -rf /tmp/doc-exec* |     rm -rf /tmp/doc-exec* | ||||||
|     #pip install pytest==2.3.4 |  | ||||||
|     make regen |     make regen | ||||||
| 
 | 
 | ||||||
| [testenv:jython] | [testenv:jython] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue