From 5574e457498955e09795164073051409498b161b Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 2 Jul 2012 13:13:48 +0200 Subject: [PATCH 1/2] fix issue165 - fix broken links in documentation, also point to stackoverflow from FAQ and contact page --- CHANGELOG | 3 ++- doc/en/announce/release-2.0.1.txt | 2 +- doc/en/contact.txt | 4 ++++ doc/en/example/parametrize.txt | 2 +- doc/en/faq.txt | 15 ++++++++------- doc/en/projects.txt | 2 +- doc/en/usage.txt | 4 ++-- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6701d7478..34363dec1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Changes between 2.2.4 and 2.2.5.dev ----------------------------------- +- fix issue165 - broken links in documentation - catch unicode-issues when writing failure representations to terminal to prevent the whole session from crashing - fix xfail/skip confusion: a skip-mark or an imperative pytest.skip @@ -290,7 +291,7 @@ Changes between 2.0.0 and 2.0.1 - refinements to "collecting" output on non-ttys - refine internal plugin registration and --traceconfig output - introduce a mechanism to prevent/unregister plugins from the - command line, see http://pytest.org/plugins.html#cmdunregister + command line, see http://pytest.org/latest/plugins.html#cmdunregister - activate resultlog plugin by default - fix regression wrt yielded tests which due to the collection-before-running semantics were not diff --git a/doc/en/announce/release-2.0.1.txt b/doc/en/announce/release-2.0.1.txt index 4a2a2b2a3..2f41ef943 100644 --- a/doc/en/announce/release-2.0.1.txt +++ b/doc/en/announce/release-2.0.1.txt @@ -57,7 +57,7 @@ Changes between 2.0.0 and 2.0.1 - refinements to "collecting" output on non-ttys - refine internal plugin registration and --traceconfig output - introduce a mechanism to prevent/unregister plugins from the - command line, see http://pytest.org/plugins.html#cmdunregister + command line, see http://pytest.org/latest/plugins.html#cmdunregister - activate resultlog plugin by default - fix regression wrt yielded tests which due to the collection-before-running semantics were not diff --git a/doc/en/contact.txt b/doc/en/contact.txt index 0a8796b01..8ef62c810 100644 --- a/doc/en/contact.txt +++ b/doc/en/contact.txt @@ -9,6 +9,10 @@ Contact channels 2.0 and above). You may also peek at the `old issue tracker`_ but please don't submit bugs there anymore. +- `pytest on stackoverflow.com `_ + to post questions with the tag ``pytest``. New Questions will usually + be seen by pytest users or developers. + - `Testing In Python`_: a mailing list for Python testing tools and discussion. - `py-dev developers list`_ pytest specific announcements and discussions. diff --git a/doc/en/example/parametrize.txt b/doc/en/example/parametrize.txt index 914497ec4..e4173a346 100644 --- a/doc/en/example/parametrize.txt +++ b/doc/en/example/parametrize.txt @@ -122,7 +122,7 @@ we'll get an error on the last one. A quick port of "testscenarios" ------------------------------------ -.. _`test scenarios`: http://bazaar.launchpad.net/~lifeless/testscenarios/trunk/annotate/head%3A/doc/example.py +.. _`test scenarios`: http://pypi.python.org/pypi/testscenarios/ Here is a quick port to run tests configured with `test scenarios`_, an add-on from Robert Collins for the standard unittest framework. We diff --git a/doc/en/faq.txt b/doc/en/faq.txt index c0c6d1f87..cb233beed 100644 --- a/doc/en/faq.txt +++ b/doc/en/faq.txt @@ -3,8 +3,9 @@ Some Issues and Questions .. note:: - If you don't find an answer here, checkout the :ref:`contact channels` - to get help. + If you don't find an answer here, you may checkout + `pytest Q&A at Stackoverflow `_ + or other :ref:`contact channels` to get help. On naming, nosetests, licensing and magic ------------------------------------------------ @@ -36,7 +37,7 @@ In 2012, some work is going into the `pytest-django plugin `_ extensible HTML/XML generator * `tiddlyweb `_ optionally headless, extensible RESTful datastore * `fancycompleter `_ for colorful tab-completion -* `Paludis `_ tools for Gentoo Paludis package manager +* `Paludis `_ tools for Gentoo Paludis package manager * `Gerald `_ schema comparison tool * `abjad `_ Python API for Formalized Score control * `bu `_ a microscopic build system diff --git a/doc/en/usage.txt b/doc/en/usage.txt index 04cbd7b4a..c696d9c89 100644 --- a/doc/en/usage.txt +++ b/doc/en/usage.txt @@ -130,7 +130,7 @@ To create plain-text machine-readable result files you can issue:: and look at the content at the ``path`` location. Such files are used e.g. by the `PyPy-test`_ web page to show test results over several revisions. -.. _`PyPy-test`: http://codespeak.net:8099/summary +.. _`PyPy-test`: http://buildbot.pypy.org/summary Sending test report to pocoo pastebin service @@ -148,7 +148,7 @@ for example ``-x`` if you only want to send one particular failure. py.test --pastebin=all -Currently only pasting to the http://paste.pocoo.org service is implemented. +Currently only pasting to the http://bpaste.net service is implemented. Calling pytest from Python code ---------------------------------------------------- From 838e758cf72708c821ecfb7f3fe945e74a3934ae Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 7 Jul 2012 07:40:51 +0200 Subject: [PATCH 2/2] exit with errno instead of always signalling success, thanks John Anderson --- CHANGELOG | 1 + doc/en/goodpractises.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index e71727514..4f7fff9e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Changes between 2.2.4 and 2.3.0.dev ----------------------------------- +- fix "python setup.py test" example to cause a proper "errno" return - fix issue165 - fix broken doc links and mention stackoverflow for FAQ - fix issue139 - merge FuncargRequest and Item API such that funcarg-functionality is now directly available on the "item" diff --git a/doc/en/goodpractises.txt b/doc/en/goodpractises.txt index 89836b659..e294eefa8 100644 --- a/doc/en/goodpractises.txt +++ b/doc/en/goodpractises.txt @@ -103,6 +103,7 @@ which means its really easy to extend its test command to support running a pytest from test requirements:: from setuptools.command.test import test as TestCommand + import sys class PyTest(TestCommand): def finalize_options(self): @@ -112,7 +113,8 @@ to support running a pytest from test requirements:: def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest - pytest.main(self.test_args) + errno = pytest.main(self.test_args) + sys.exit(errno) setup( #...,