--collect-only

A pytest option that lists every test it would run without running any of them.

In more detail

It is the fastest way to check that a test you expect is actually collected, and to read the suite's names as a specification. Combined with -q it prints one node ID per line.

Example

pytest -q --collect-only test_names.py

Related terms

Taught in

References