pytest -v
The pytest option that prints each test's node ID and result on its own line instead of one dot per test.
In more detail
Verbose output is what you want in continuous integration logs, because a dot tells nobody anything weeks later. Pair it with --no-header to keep the output on one screen.
Example
pytest -v --no-header test_discount.pyRelated terms
- node ID — The full address pytest gives each test, made of the file path, two colons and the test name, such as test_discount.py::test_a_silly_percentage_is_refused.
- pytest -q — The pytest option that shortens output to a dot per passing test and a one-line summary.
- session header — The block pytest prints at the start of a run naming the platform, Python and pytest versions, root directory, plugins and number of tests collected.
Taught in
- Introducing pytest — Automated Testing, TDD & Quality Engineering
- Parametrised Tests — Automated Testing, TDD & Quality Engineering