pytest1-@pytest.fixture request参数化fixture
import pytest
# mark标记 带参数的fixture 中的某些参数枚举值
@pytest.fixture(params=[1, 2, pytest.param(3, marks=pytest.mark.skip)])
def data(request):
return request.param
# 调用data
def test_data(data):
...
原创
2020-02-25 18:22:07 ·
388 阅读 ·
0 评论