move and consolidate some more plugin docs
--HG-- branch : trunk
This commit is contained in:
parent
d89d0e8b26
commit
c614adcf48
|
@ -13,4 +13,5 @@ py.test reference documentation
|
|||
mark.txt
|
||||
doctest.txt
|
||||
recwarn.txt
|
||||
reporting.txt
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ then all tests in that directory will execute with "fd" style capturing.
|
|||
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
|
||||
``capsys`` or ``capfd`` in the test function signature. Here
|
||||
is an example test function that performs some output related
|
||||
|
|
|
@ -11,3 +11,4 @@
|
|||
.. _mercurial: http://mercurial.selenic.com/wiki/
|
||||
.. _`setuptools`: http://pypi.python.org/pypi/setuptools
|
||||
.. _`distribute`: http://pypi.python.org/pypi/distribute
|
||||
.. _hudon: http://hudson-ci.org/
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -25,14 +25,3 @@ created as a sub directory of the base temporary
|
|||
directory. The returned object is a `py.path.local`_
|
||||
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
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
|
||||
|
|
|
@ -1,24 +1,4 @@
|
|||
"""
|
||||
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.
|
||||
|
||||
"""
|
||||
""" submit failure or test session information to a pastebin service. """
|
||||
import py, sys
|
||||
|
||||
class url:
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
"""non-xml machine-readable logging of test results.
|
||||
Useful for buildbot integration code. See the `PyPy-test`_
|
||||
web page for post-processing.
|
||||
|
||||
.. _`PyPy-test`: http://codespeak.net:8099/summary
|
||||
|
||||
"""
|
||||
""" create machine readable plain text file with results. """
|
||||
|
||||
import py
|
||||
from py.builtin import print_
|
||||
|
|
Loading…
Reference in New Issue