2009-07-21 00:54:08 +08:00
|
|
|
|
|
|
|
pytest_unittest plugin
|
|
|
|
======================
|
|
|
|
|
|
|
|
automatically discover and run traditional "unittest.py" style tests.
|
|
|
|
|
2009-07-22 22:09:49 +08:00
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
|
2009-07-21 00:56:02 +08:00
|
|
|
Usage
|
|
|
|
----------------
|
2009-07-21 00:54:08 +08:00
|
|
|
|
2009-07-21 00:56:02 +08:00
|
|
|
This plugin collects and runs Python `unittest.py style`_ tests.
|
|
|
|
It will automatically collect ``unittest.TestCase`` subclasses
|
|
|
|
and their ``test`` methods from the test modules of a project
|
|
|
|
(usually following the ``test_*.py`` pattern).
|
2009-07-21 00:54:08 +08:00
|
|
|
|
2009-07-21 00:56:02 +08:00
|
|
|
This plugin is enabled by default.
|
2009-07-21 00:54:08 +08:00
|
|
|
|
2009-07-21 00:56:02 +08:00
|
|
|
.. _`unittest.py style`: http://docs.python.org/library/unittest.html
|
2009-07-21 00:54:08 +08:00
|
|
|
|
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_unittest.py`_ plugin source code
|
|
|
|
2. put it somewhere as ``pytest_unittest.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-22 22:09:49 +08:00
|
|
|
.. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/85fe614ab05f301f206935d11a477df184cbbce6/py/test/plugin/pytest_unittest.py
|
2009-07-21 00:54:08 +08:00
|
|
|
.. _`extend`: ../extend.html
|
|
|
|
.. _`plugins`: index.html
|
|
|
|
.. _`contact`: ../../contact.html
|
|
|
|
.. _`checkout the py.test development version`: ../../download.html#checkout
|