I am using pytest. I have two files in a directory. In one of the files there is a long running test case that generates some output. In the other file there is a test case
Maybe you can consider using dependency pytest plugin, where you can set the test dependencies easily:
@pytest.mark.dependency()
def test_long():
pass
@pytest.mark.dependency(depends=['test_long'])
def test_short():
pass
This way test_short
will only execute if test_long
is success and force the execution sequence as well.