parent
d994c51ccd
commit
1d28dcf140
|
@ -1,3 +1,9 @@
|
||||||
|
Changes between 1.2.1 and XXX
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
- added links to the new capturelog and coverage plugins
|
||||||
|
|
||||||
|
|
||||||
Changes between 1.2.1 and 1.2.0
|
Changes between 1.2.1 and 1.2.0
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ WIDTH = 75
|
||||||
plugins = [
|
plugins = [
|
||||||
('advanced python testing',
|
('advanced python testing',
|
||||||
'skipping mark pdb figleaf '
|
'skipping mark pdb figleaf '
|
||||||
'monkeypatch capture recwarn tmpdir',),
|
'monkeypatch coverage capture capturelog recwarn tmpdir',),
|
||||||
('distributed testing, CI and deployment',
|
('distributed testing, CI and deployment',
|
||||||
'xdist pastebin junitxml resultlog genscript',),
|
'xdist pastebin junitxml resultlog genscript',),
|
||||||
('testing domains and conventions',
|
('testing domains and conventions codecheckers',
|
||||||
'oejskit django unittest nose doctest restdoc'),
|
'oejskit django unittest nose doctest restdoc'),
|
||||||
('internal, debugging, help functionality',
|
('internal, debugging, help functionality',
|
||||||
'helpconfig terminal hooklog')
|
'helpconfig terminal hooklog')
|
||||||
|
@ -22,6 +22,9 @@ externals = {
|
||||||
'oejskit': "run javascript tests in real life browsers",
|
'oejskit': "run javascript tests in real life browsers",
|
||||||
'xdist': None,
|
'xdist': None,
|
||||||
'figleaf': None,
|
'figleaf': None,
|
||||||
|
'capturelog': None,
|
||||||
|
'coverage': None,
|
||||||
|
'codecheckers': None,
|
||||||
'django': "for testing django applications",
|
'django': "for testing django applications",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,51 @@
|
||||||
pytest_coverage plugin (EXTERNAL)
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
This plugin allows to use Ned's coverage_ package, see
|
Write and report coverage data with the 'coverage' package.
|
||||||
|
===========================================================
|
||||||
http://github.com/rozza/py.test-plugins
|
|
||||||
|
|
||||||
|
|
||||||
.. _coverage: http://pypi.python.org/pypi/coverage
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Note: Original code by Ross Lawley.
|
||||||
|
|
||||||
|
Install
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Use pip to (un)install::
|
||||||
|
|
||||||
|
pip install pytest-coverage
|
||||||
|
pip uninstall pytest-coverage
|
||||||
|
|
||||||
|
or alternatively use easy_install to install::
|
||||||
|
|
||||||
|
easy_install pytest-coverage
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-------------
|
||||||
|
|
||||||
|
To get full test coverage reports for a particular package type::
|
||||||
|
|
||||||
|
py.test --cover-report=report
|
||||||
|
|
||||||
|
command line options
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
|
||||||
|
``--cover=COVERPACKAGES``
|
||||||
|
(multi allowed) only include info from specified package.
|
||||||
|
``--cover-report=REPORT_TYPE``
|
||||||
|
html: Directory for html output.
|
||||||
|
report: Output a text report.
|
||||||
|
annotate: Annotate your source code for which lines were executed and which were not.
|
||||||
|
xml: Output an xml report compatible with the cobertura plugin for hudson.
|
||||||
|
``--cover-directory=DIRECTORY``
|
||||||
|
Directory for the reports (html / annotate results) defaults to ./coverage
|
||||||
|
``--cover-xml-file=XML_FILE``
|
||||||
|
File for the xml report defaults to ./coverage.xml
|
||||||
|
``--cover-show-missing``
|
||||||
|
Show missing files
|
||||||
|
``--cover-ignore-errors=IGNORE_ERRORS``
|
||||||
|
Ignore errors of finding source files for code.
|
||||||
|
|
||||||
|
.. include:: links.txt
|
||||||
|
|
|
@ -12,8 +12,12 @@ figleaf_ (external) report test coverage using the 'figleaf' package.
|
||||||
|
|
||||||
monkeypatch_ safely patch object attributes, dicts and environment variables.
|
monkeypatch_ safely patch object attributes, dicts and environment variables.
|
||||||
|
|
||||||
|
coverage_ (external) Write and report coverage data with the 'coverage' package.
|
||||||
|
|
||||||
capture_ configurable per-test stdout/stderr capturing mechanisms.
|
capture_ configurable per-test stdout/stderr capturing mechanisms.
|
||||||
|
|
||||||
|
capturelog_ (external) capture output of logging module.
|
||||||
|
|
||||||
recwarn_ helpers for asserting deprecation and other warnings.
|
recwarn_ helpers for asserting deprecation and other warnings.
|
||||||
|
|
||||||
tmpdir_ provide temporary directories to test functions.
|
tmpdir_ provide temporary directories to test functions.
|
||||||
|
@ -33,8 +37,8 @@ resultlog_ non-xml machine-readable logging of test results.
|
||||||
genscript_ generate standalone test script to be distributed along with an application.
|
genscript_ generate standalone test script to be distributed along with an application.
|
||||||
|
|
||||||
|
|
||||||
testing domains and conventions
|
testing domains and conventions codecheckers
|
||||||
===============================
|
============================================
|
||||||
|
|
||||||
oejskit_ (external) run javascript tests in real life browsers
|
oejskit_ (external) run javascript tests in real life browsers
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
.. _`pytest_tmpdir.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_tmpdir.py
|
.. _`pytest_tmpdir.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_tmpdir.py
|
||||||
.. _`terminal`: terminal.html
|
.. _`terminal`: terminal.html
|
||||||
.. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_hooklog.py
|
.. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_hooklog.py
|
||||||
|
.. _`capturelog`: capturelog.html
|
||||||
.. _`junitxml`: junitxml.html
|
.. _`junitxml`: junitxml.html
|
||||||
.. _`pytest_skipping.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_skipping.py
|
.. _`pytest_skipping.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_skipping.py
|
||||||
.. _`checkout the py.test development version`: ../../install.html#checkout
|
.. _`checkout the py.test development version`: ../../install.html#checkout
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
.. _`recwarn`: recwarn.html
|
.. _`recwarn`: recwarn.html
|
||||||
.. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_pdb.py
|
.. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_pdb.py
|
||||||
.. _`monkeypatch`: monkeypatch.html
|
.. _`monkeypatch`: monkeypatch.html
|
||||||
|
.. _`coverage`: coverage.html
|
||||||
.. _`resultlog`: resultlog.html
|
.. _`resultlog`: resultlog.html
|
||||||
.. _`pytest_junitxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_junitxml.py
|
.. _`pytest_junitxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.1/py/_plugin/pytest_junitxml.py
|
||||||
.. _`django`: django.html
|
.. _`django`: django.html
|
||||||
|
|
Loading…
Reference in New Issue