With pytest, one can mark tests using a decorator
@pytest.mark.slow def some_slow_test(): pass
Then, from the command line, one can tell py
It's also possible to stack the mark decorators.
@pytest.mark.slow @pytest.mark.main def test_myfunction(): pass
I then called py.test -m "slow and main" and only the tests with both decorators were called.
py.test -m "slow and main"
py.test -m "not (slow and main)" resulted in the other tests running
py.test -m "not (slow and main)"