2010-11-02 07:53:53 +08:00
2012-10-12 20:52:36 +08:00
.. _features:
2010-11-02 07:53:53 +08:00
2013-12-12 20:06:25 +08:00
.. second training: `professional testing with Python <http://www.python-academy.com/courses/specialtopics/python_course_testing.html>`_ , 25-27th November 2013, Leipzig.
2013-07-16 17:30:21 +08:00
2012-10-28 18:25:53 +08:00
pytest: helps you write better programs
2011-07-07 04:05:48 +08:00
=============================================
2010-11-06 06:37:31 +08:00
2012-10-09 20:35:17 +08:00
**a mature full-featured Python testing tool**
2008-08-16 23:26:59 +08:00
2013-11-22 20:57:15 +08:00
- runs on Posix/Windows, Python 2.5-3.3, PyPy and Jython-2.5.1
2011-07-09 19:23:58 +08:00
- :ref:`comprehensive online <toc>` and `PDF documentation <pytest.pdf>`_
2013-05-08 03:34:59 +08:00
- many :ref:`third party plugins <extplugins>` and
:ref:`builtin helpers <pytest helpers>`
2011-07-07 04:05:48 +08:00
- used in :ref:`many projects and organisations <projects>`, in test
2013-05-08 03:34:59 +08:00
suites with up to twenty thousand tests
- strict policy of remaining backward compatible across releases
2011-07-08 18:42:26 +08:00
- comes with many :ref:`tested examples <examples>`
2008-08-16 23:26:59 +08:00
2012-10-09 20:35:17 +08:00
**provides easy no-boilerplate testing**
2011-07-07 04:05:48 +08:00
2012-10-18 18:24:50 +08:00
- makes it :ref:`easy to get started <getstarted>`,
many :ref:`usage options <usage>`
2011-07-07 04:05:48 +08:00
- :ref:`assert with the assert statement`
- helpful :ref:`traceback and failing assertion reporting <tbreportdemo>`
- allows :ref:`print debugging <printdebugging>` and :ref:`the
capturing of standard output during test execution <captures>`
2012-10-09 20:35:17 +08:00
**scales from simple unit to complex functional testing**
2011-07-07 04:05:48 +08:00
2013-05-08 03:34:59 +08:00
- :ref:`modular parametrizeable fixtures <fixture>` (new in 2.3,
improved in 2.4)
2012-10-07 19:06:17 +08:00
- :ref:`parametrized test functions <parametrized test functions>`
2012-10-18 18:24:50 +08:00
- :ref:`mark`
2013-05-08 03:34:59 +08:00
- :ref:`skipping` (improved in 2.4)
2011-07-07 04:05:48 +08:00
- can :ref:`distribute tests to multiple CPUs <xdistcpu>` through :ref:`xdist plugin <xdist>`
- can :ref:`continuously re-run failing tests <looponfailing>`
- flexible :ref:`Python test discovery`
2012-10-09 20:35:17 +08:00
**integrates many common testing methods**:
2011-07-07 04:05:48 +08:00
2012-10-25 19:48:31 +08:00
- multi-paradigm: pytest can run many ``nose``, ``unittest.py`` and
``doctest.py`` style test suites, including running testcases made for
Django and trial
2012-10-09 20:35:17 +08:00
- supports :ref:`good integration practises <goodpractises>`
2011-07-07 04:05:48 +08:00
- supports extended :ref:`xUnit style setup <xunitsetup>`
- supports domain-specific :ref:`non-python tests`
- supports the generation of testing coverage reports
- `Javascript unit- and functional testing`_
2012-10-18 18:24:50 +08:00
- supports :pep:`8` compliant coding styles in tests
2011-07-07 04:05:48 +08:00
2012-10-09 20:35:17 +08:00
**extensive plugin and customization system**:
2011-07-07 04:05:48 +08:00
- all collection, reporting, running aspects are delegated to hook functions
2013-05-08 03:34:59 +08:00
- customizations can be per-directory, per-project or per PyPI released plugin
- it is easy to add command line options or customize existing behaviour
2011-07-07 04:05:48 +08:00
2013-06-20 20:05:16 +08:00
2011-07-07 04:05:48 +08:00
.. _`Javascript unit- and functional testing`: http://pypi.python.org/pypi/oejskit
.. _`easy`: http://bruynooghe.blogspot.com/2009/12/skipping-slow-test-by-default-in-pytest.html
2009-03-24 00:40:18 +08:00
2008-08-16 23:26:59 +08:00