List available tests with py.test

guettli picture guettli · Jan 30, 2014 · Viewed 11k times · Source

I can't find a way to list the tests which I can call with py.test -k PATTERN

How can I see the list of the available tests?

Answer

flub picture flub · Jan 30, 2014

You can also use --collect-only, this will show a tree-like structure of the collected nodes. Usually one can simply -k on the names of the Function nodes.