output capturing

pytest's default behaviour of holding back anything a test prints and showing it only if the test fails.

In more detail

The -s option, short for --capture=no, turns capturing off so print output reaches the screen as it happens. The course uses it to watch the order in which fixtures are built and torn down.

Example

pytest -q -s test_scope.py

Related terms

Taught in

References