入门7-pytest跳过测试用例
1.无条件跳过用例
@pytest.mark.skip(reason="无理由跳过")
2.有条件跳过用例
@pytest.mark.skipif(workage<5,reason="无理由跳过")
@pytest.mark.skipif(workage<5,reason="有理由跳过") def test_company(self): print("this is company") @pytest.mark.skip(reason="无理由跳过") def test_company2(self): print("this is company 2")