--tb

The pytest option that chooses how much of each failure's traceback to print, from long to short to none.

In more detail

--tb=short keeps each failure to a few lines, and --tb=no hides tracebacks so only the summary remains, which is handy when you want to count failures rather than read them. The default, --tb=auto, prints the long form for the first and last entries and short for the rest.

Example

pytest -q --tb=short test_cart.py

Related terms

Taught in

References