move and consolidate some more plugin docs

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-10-11 00:14:32 +02:00
parent d89d0e8b26
commit c614adcf48
11 changed files with 52 additions and 148 deletions

View File

@ -13,4 +13,5 @@ py.test reference documentation
mark.txt mark.txt
doctest.txt doctest.txt
recwarn.txt recwarn.txt
reporting.txt

View File

@ -42,7 +42,7 @@ then all tests in that directory will execute with "fd" style capturing.
Accessing captured output from a test function Accessing captured output from a test function
--------------------------------------------------- ---------------------------------------------------
The `funcarg mechanism`_ allows test function a very easy The :ref:`funcarg mechanism` allows test function a very easy
way to access the captured output by simply using the names way to access the captured output by simply using the names
``capsys`` or ``capfd`` in the test function signature. Here ``capsys`` or ``capfd`` in the test function signature. Here
is an example test function that performs some output related is an example test function that performs some output related

View File

@ -11,3 +11,4 @@
.. _mercurial: http://mercurial.selenic.com/wiki/ .. _mercurial: http://mercurial.selenic.com/wiki/
.. _`setuptools`: http://pypi.python.org/pypi/setuptools .. _`setuptools`: http://pypi.python.org/pypi/setuptools
.. _`distribute`: http://pypi.python.org/pypi/distribute .. _`distribute`: http://pypi.python.org/pypi/distribute
.. _hudon: http://hudson-ci.org/

46
doc/reporting.txt Normal file
View File

@ -0,0 +1,46 @@
Sending output to files or to remote services
=================================================================
creating JUnitXML format files
----------------------------------------------------
To create result files which can be read by Hudson_ or other Continous
integration servers, use this::
$ py.test --junitxml=path
to create an XML file at ``path``.
creating resultlog format files
----------------------------------------------------
To create plain-text machine-readable result files you can issue::
$ py.test --resultlog=path
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
send test report to pocoo pastebin service
-----------------------------------------------------
**Creating a URL for each test failure**::
py.test --pastebin=failed
This will submit test run information to a remote Paste service and
provide a URL for each failure. You may select tests as usual or add
for example ``-x`` if you only want to send one particular failure.
**Creating a URL for a whole test session log**::
py.test --pastebin=all
Currently only pasting to the http://paste.pocoo.org service is implemented.
.. include:: links.inc

View File

@ -1,43 +0,0 @@
submit failure or test session information to a pastebin service.
=================================================================
.. contents::
:local:
Usage
----------
**Creating a URL for each test failure**::
py.test --pastebin=failed
This will submit test run information to a remote Paste service and
provide a URL for each failure. You may select tests as usual or add
for example ``-x`` if you only want to send one particular failure.
**Creating a URL for a whole test session log**::
py.test --pastebin=all
Currently only pasting to the http://paste.pocoo.org service is implemented.
command line options
--------------------
``--pastebin=mode``
send failed|all info to Pocoo pastebin service.
Start improving this plugin in 30 seconds
=========================================
1. Download `pytest_pastebin.py`_ plugin source code
2. put it somewhere as ``pytest_pastebin.py`` into your import path
3. a subsequent ``py.test`` run will use your local version
Checkout customize_, other plugins_ or `get in contact`_.
.. include:: links.txt

View File

@ -1,32 +0,0 @@
perform ReST syntax, local and remote reference tests on .rst/.txt files.
=========================================================================
.. contents::
:local:
command line options
--------------------
``-R, --urlcheck``
urlopen() remote links found in ReST text files.
``--urltimeout=secs``
timeout in seconds for remote urlchecks
``--forcegen``
force generation of html files.
Start improving this plugin in 30 seconds
=========================================
1. Download `pytest_restdoc.py`_ plugin source code
2. put it somewhere as ``pytest_restdoc.py`` into your import path
3. a subsequent ``py.test`` run will use your local version
Checkout customize_, other plugins_ or `get in contact`_.
.. include:: links.txt

View File

@ -1,31 +0,0 @@
non-xml machine-readable logging of test results.
=================================================
.. contents::
:local:
Useful for buildbot integration code. See the `PyPy-test`_
web page for post-processing.
.. _`PyPy-test`: http://codespeak.net:8099/summary
command line options
--------------------
``--resultlog=path``
path for machine-readable result log.
Start improving this plugin in 30 seconds
=========================================
1. Download `pytest_resultlog.py`_ plugin source code
2. put it somewhere as ``pytest_resultlog.py`` into your import path
3. a subsequent ``py.test`` run will use your local version
Checkout customize_, other plugins_ or `get in contact`_.
.. include:: links.txt

View File

@ -25,14 +25,3 @@ created as a sub directory of the base temporary
directory. The returned object is a `py.path.local`_ directory. The returned object is a `py.path.local`_
path object. path object.
Start improving this plugin in 30 seconds
=========================================
1. Download `pytest_tmpdir.py`_ plugin source code
2. put it somewhere as ``pytest_tmpdir.py`` into your import path
3. a subsequent ``py.test`` run will use your local version
Checkout customize_, other plugins_ or `get in contact`_.
.. include:: links.txt

View File

@ -1,5 +1,4 @@
""" """ logging of test results in JUnit-XML format, for use with Hudson
logging of test results in JUnit-XML format, for use with Hudson
and build integration servers. Based on initial code from Ross Lawley. and build integration servers. Based on initial code from Ross Lawley.
""" """

View File

@ -1,24 +1,4 @@
""" """ submit failure or test session information to a pastebin service. """
submit failure or test session information to a pastebin service.
Usage
----------
**Creating a URL for each test failure**::
py.test --pastebin=failed
This will submit test run information to a remote Paste service and
provide a URL for each failure. You may select tests as usual or add
for example ``-x`` if you only want to send one particular failure.
**Creating a URL for a whole test session log**::
py.test --pastebin=all
Currently only pasting to the http://paste.pocoo.org service is implemented.
"""
import py, sys import py, sys
class url: class url:

View File

@ -1,10 +1,4 @@
"""non-xml machine-readable logging of test results. """ create machine readable plain text file with results. """
Useful for buildbot integration code. See the `PyPy-test`_
web page for post-processing.
.. _`PyPy-test`: http://codespeak.net:8099/summary
"""
import py import py
from py.builtin import print_ from py.builtin import print_