UnitTests

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

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.

  • PyTest – alternative to PyUnit and with a simpler syntax.

  • nose2 – a discovery-based framwork that extends unittest (successor to nose{.backtick}).

  • 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