Note
second training: professional testing with Python , 25-27th November 2013, Leipzig.
a mature full-featured Python testing tool
- runs on Posix/Windows, Python 2.4-3.3, PyPy and Jython-2.5.1
- comprehensive online and PDF documentation
- many third party plugins and builtin helpers
- used in many projects and organisations, in test suites with up to twenty thousand tests
- strict policy of remaining backward compatible across releases
- comes with many tested examples
provides easy no-boilerplate testing
scales from simple unit to complex functional testing
- modular parametrizeable fixtures (new in 2.3, improved in 2.4)
- parametrized test functions
- Marking test functions with attributes
- Skip and xfail: dealing with tests that can not succeed (improved in 2.4)
- can distribute tests to multiple CPUs through xdist plugin
- can continuously re-run failing tests
- flexible Conventions for Python test discovery
integrates many common testing methods:
- multi-paradigm: pytest can run many nose, unittest.py and doctest.py style test suites, including running testcases made for Django and trial
- supports good integration practises
- supports extended xUnit style setup
- supports domain-specific Working with non-python tests
- supports the generation of testing coverage reports
- Javascript unit- and functional testing
- supports PEP 8 compliant coding styles in tests
extensive plugin and customization system:
- all collection, reporting, running aspects are delegated to hook functions
- customizations can be per-directory, per-project or per PyPI released plugin
- it is easy to add command line options or customize existing behaviour