标签:test 枚举 set ram param port params def ==
import pytest
# 使用mark标记 带参数的fixture 中的某些参数枚举值
@pytest.fixture(params=[0, 1, pytest.param(2, marks=pytest.mark.skip)])
def data_set(request):
return request.param
def test_data(data_set):
pass
if __name__ == ‘__main__‘:
pytest.main([‘-vs‘, ‘test_fixture_marks.py‘])
标签:test 枚举 set ram param port params def ==
原文地址:https://www.cnblogs.com/wang-mengmeng/p/11776091.html