1.关于pytest.fixture
@pytest.fixture(scope="module", autouse=True)
其中autouse=True,作用域默认是function,加了scope=module之后作用域就是module
运行结果:
2.conftest.py文件中是不能写class的 !注意⚠️
1.关于pytest.fixture
@pytest.fixture(scope="module", autouse=True)
其中autouse=True,作用域默认是function,加了scope=module之后作用域就是module
运行结果:
2.conftest.py文件中是不能写class的 !注意⚠️