用fixture实现teardown并不是一个独立的函数,而是用 yield 关键字来开启teardown操作 @pytest.fixture def init_driver(): print('begin driver')
確定! 回上一頁