用fixture實現teardown並不是一個獨立的函式,而是用yield關鍵字來開啟teardown操作 @pytest.fixture def init_driver(): print('begin driver')
確定! 回上一頁