7

I am using Python's nose and I have marked some of my tests as "slow", as explained in the attrib plugin documentation.

I would like to skip all "slow" Tests by default when running nosetests, i.e. without having to write nosetests -a '!slow'. But I want to be able to run these tests when explicitly running them or writing nosetests -a 'slow'.

How can I achieve this?

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
André
  • 2,042
  • 1
  • 23
  • 26

1 Answers1

7

"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.cfg with the following contents should work:

[nosetests]
attr=!speed=slow
t-8ch
  • 2,583
  • 14
  • 18