📅  最后修改于: 2022-03-11 14:51:26.337000             🧑  作者: Mango
# content of conftest.py @by github -> linkerunk
import pytest
def pytest_addoption(parser):
parser.addoption(
"--cmdopt", action="store", default="type1", help="my option: type1 or type2"
)
@pytest.fixture
def cmdopt(request):
return request.config.getoption("--cmdopt")