pytest [email protected]_fixture()

@pytest.yield_fixture()
source code interpretation:
deprecated:: 3.0 [3.0 has been deprecated]
Use :py:func: pytest.fixturedirectly instead. [It can be called directly by using pytest.fixture], as follows:

@pytest.fixture(autouse=True)
def project_session_start():
    print('\n启动浏览器')
    yield
    print('\n退出浏览器')

Guess you like

Origin blog.csdn.net/weixin_45451320/article/details/113839775