UnitTests
This wiki is in the process of being archived due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies. Edits are discouraged.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.
Contents
Python Testing Frameworks
Unittest -- full-featured unit testing system, inspired by Java's JUnit. Part of the Python Standard Library (as an external project it was called PyUnit).
DocTest -- lightweight testframework, allows you to embed tests directly in the docstrings, making it easy to combine code examples and test cases in one place. Part of the Python Standard Library.
nose2 -- a discovery-based framwork that extends unittest (successor to nose).
Testify -- Pythonic testing framework compatible with unittest tests.
Robot -- Framework for test automation and robotic process automation (not just for Python).
Behave -- Framework for Behavior-Driven Development.
Hypothesis -- Powerful property-based testing.
These are useful for TestDrivenDevelopment
See also: TestHarnessDesign