List available tests with py.test

pytest, python, unit-testing

Solution

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.

Problem

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?

Original source