I usually run my tests with tox
which calls pytest
. This setup works fine in many projects. In some projects, however, I have some tests which take long (several minutes). I don't want to run them every time. I would like to decorate the tests as long.
Something like this:
$ tox --skip-long
and
# core modules
import unittest
class Foo(unittest.TestCase):
def test_bar(self):
...
@long
def test_long_bar(self):
...
How can I do this?