Nose: how to skip default tests?

I use the Python nose, and some of my tests are marked as "slow" as described in the documentation for attaching attributes .

I would like to skip all the "slow" default tests at startup nosetests, i.e. without the need to write nosetests -a '!slow'. But I want to be able to run these tests when I explicitly run them or write them nosetests -a 'slow'.

How can i achieve this?

+5
source share
1 answer

"The options are the same as on the command line, with the prefix removed" ( https://nose.readthedocs.org/en/latest/usage.html#configuration )

A file setup.cfgwith the following contents should work:

[nosetests]
attr=!speed=slow
+5
source

All Articles