小编Rod*_*nel的帖子

如何在pytest中仅运行未标记的测试

我的python测试代码中有几个标记:

@pytest.mark.slowtest
@pytest.mark.webtest
@pytest.mark.stagingtest
Run Code Online (Sandbox Code Playgroud)

例如,我能够使用标记选择性地运行测试 pytest -m slowtest

如何在不诉诸的情况下运行未标记的测试pytest -m "not (slowtest or webtest or stagingtest)"?

你可以想象,我们将来可能会使用其他标记......

python pytest

7
推荐指数
2
解决办法
824
查看次数

标签 统计

pytest ×1

python ×1