Test Runners
test runner - is a component which orchestrates the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a textual interface, or return a special value to indicate the results of executing the tests.
unittest
framework is very popular and used in many projects. But there is one area that often is replaced with parts of other testing frameworks - test runner component.
Modern framework do much better in term of auto-discovery of tests than unittest
.
Unittest Test Discovery
You can run unit test (written via unittest
) with the CLI command python -m unittest
. The help for this command is:
From Python 3.2
unittest
has it's own Test Discovery (if comparing to other framework's test runner/discovery the options are pretty basic):
Last updated
Was this helpful?