2009-07-21 00:54:08 +08:00
|
|
|
|
|
|
|
pytest_doctest plugin
|
|
|
|
=====================
|
|
|
|
|
|
|
|
collect and execute doctests from modules and test files.
|
|
|
|
|
2009-07-22 22:09:49 +08:00
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
|
2009-07-21 00:54:08 +08:00
|
|
|
Usage
|
|
|
|
-------------
|
|
|
|
|
|
|
|
By default all files matching the ``test_*.txt`` pattern will
|
|
|
|
be run with the ``doctest`` module. If you issue::
|
|
|
|
|
|
|
|
py.test --doctest-modules
|
|
|
|
|
|
|
|
all python files in your projects will be doctest-run
|
|
|
|
as well.
|
|
|
|
|
|
|
|
command line options
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
|
|
``--doctest-modules``
|
|
|
|
search all python files for doctests
|
|
|
|
|
2009-07-22 22:09:49 +08:00
|
|
|
Start improving this plugin in 30 seconds
|
|
|
|
=========================================
|
2009-07-21 00:54:08 +08:00
|
|
|
|
|
|
|
|
2009-07-22 22:09:49 +08:00
|
|
|
Do you find the above documentation or the plugin itself lacking?
|
2009-07-21 00:54:08 +08:00
|
|
|
|
|
|
|
1. Download `pytest_doctest.py`_ plugin source code
|
|
|
|
2. put it somewhere as ``pytest_doctest.py`` into your import path
|
2009-07-22 22:09:49 +08:00
|
|
|
3. a subsequent ``py.test`` run will use your local version
|
2009-07-21 00:54:08 +08:00
|
|
|
|
|
|
|
Further information: extend_ documentation, other plugins_ or contact_.
|
|
|
|
|
2009-07-31 20:43:04 +08:00
|
|
|
.. include:: links.txt
|