I'd like to configure pytest such that I have to specify a marker on the command line for tests with that marker to be run. For example, say I'm using two pytest markers: slow and perf. I'd like
$ pytest # everything but slow and perf
$ pytest -m slow # only slow
$ pytest -m perf # only perf
$ pytest -m slow perf # only slow and perf
As it is, the first case doesn't work like that - it runs everything. This means that to run everything that's not marked, I need to know what markers exist, which is awkward, but also changes over time as I add new markers.
This answer almost does it, but I don't want to edit the list of markers, because I parse that list for use in a test dashboard.