pytest 利用 fixture 访问测试请求的上下文

~conftest.py
@pytest.fixture()
def fix_demo_ifMan(request):
    value11, value22 = getattr(request.function, 'value_list',(4,5))#问题:是否有request.function的写法?
    print(value11,value22)
    aa = IsManorOther.IfPersonOrZoo(value11,value22)
    return aa.ifMan()
关闭