68 lines
2.4 KiB
Plaintext
68 lines
2.4 KiB
Plaintext
py.test Features
|
|
==================
|
|
|
|
no-boilerplate testing with Python
|
|
----------------------------------
|
|
|
|
- automatic, fully customizable Python test discovery
|
|
- write simple test functions and freely group tests
|
|
- ``assert`` statement for your assertions
|
|
- powerful parametrization of test functions
|
|
- rely on helpful traceback and failing assertion reporting
|
|
- use ``print`` or ``pdb`` debugging on failures
|
|
- enables fully :pep:`8` compliant coding style
|
|
|
|
extensive plugin and customization system
|
|
------------------------------------------------------
|
|
|
|
.. _`easy`: http://bruynooghe.blogspot.com/2009/12/skipping-slow-test-by-default-in-pytest.html
|
|
|
|
- all collection, reporting, running aspects are delegated to hook functions
|
|
- hook functions are implemented per-directory, per-project or through PyPI released plugins
|
|
- it is `easy`_ to add command line options or
|
|
do other kind of add-ons and customizations.
|
|
|
|
mature command line testing tool
|
|
--------------------------------------
|
|
|
|
- powerful :ref:`usage` possibilities, well sorted command line options
|
|
- used in many projects, ranging from 10 to 10K tests
|
|
- tested on Unix and Windows from Python 2.4 up to Python 3.1 and 3.2
|
|
- keyword/testname based selection of tests
|
|
|
|
integrates well with CI systems
|
|
----------------------------------------
|
|
|
|
- produces compatible JunitXML output for Hudson or other CI servers
|
|
- produces "resultlog" text files for easy parsing
|
|
- integrates well with tox_
|
|
|
|
.. _`tox`: http://codespeak.net/tox
|
|
|
|
supports common testing practises and methods
|
|
-----------------------------------------------------------
|
|
|
|
- supports extended `xUnit style setup`_
|
|
- can integrate ``nose``, ``unittest.py`` and ``doctest.py`` style tests
|
|
- supports generating testing coverage reports
|
|
- supports :ref:`non-python tests`
|
|
- `Javasript unit- and functional testing`_
|
|
|
|
.. _`Javasript unit- and functional testing`: http://pypi.python.org/pypi/oejskit
|
|
|
|
distributing tests to local/remote subprocesses
|
|
--------------------------------------------------------
|
|
|
|
- distribute tests to multiple CPUs
|
|
- distribute tests to remote ssh or socket connected machines
|
|
- run tests in subprocess, re-run failing ones on file-change
|
|
|
|
skip or expect-to-fail a test
|
|
-------------------------------------------
|
|
|
|
- skip tests if there are platform or dependency mismatches
|
|
- xfail a test (on certain platforms)indicating an implementation problem
|
|
- you can use skip and xfail imperatively or as a decorating marker
|
|
|
|
.. include:: links.inc
|