考虑一个例子,我进行了3次测试
def test_a():
pass
def test_b():
pass
def test_c():
pass
现在有一个插件“ dependency”可创建执行依赖。但这不是我想要的。我正在努力实现的目标是
def test_a():
pass
def test_b():
pass
@pytest...[ some way to say that always execute test_a and test_b before
executing test_c ]
def test_c():
pass
通过此操作我可以始终执行test_a和test_b,即使我我按以下方式调用pytest
pytest -k test_c