0
test_set.py包含pytest -3.2.2重复测试
def test_a():
pass
def test_b():
pass
def test_a():
pass
def test_a():
pass
运行pytest --keep-重复一次test.py运行test_a只有一个实例显示
test::test_a PASSED
test::test_b PASSED
我如何运行test.py运行test_a(三次)?
谢谢。我认为每个测试都是对象,可以单独收集。使用--keep-duplicates。 – mungayree
我认为''py.test''使用Python解释器来加载测试文件,所以它不能做你希望的。 –