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
- 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.
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
supports common testing practises and methods
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