使用 @pytest.mark.skip(reason="无理由跳过") workage = 10 @pytest.mark.skipif(workage>=10,reasion="有理由跳过") 分为有理由跳过和无理由跳过