forked from DxvLwRYF/apiAutoTest
parent
e0a245de6d
commit
e61b512983
|
@ -28,7 +28,7 @@ def data_clearing():
|
|||
DataClearing.close_client()
|
||||
|
||||
|
||||
# 若不需要数据清洗功能,请把get_db()入参拿掉
|
||||
# 若不需要数据清洗功能,请把data_clearing去掉
|
||||
@pytest.fixture(scope="session")
|
||||
def get_db(data_clearing):
|
||||
"""关于其作用域请移步查看官方文档"""
|
||||
|
@ -38,6 +38,15 @@ def get_db(data_clearing):
|
|||
finally:
|
||||
db.close()
|
||||
|
||||
# 不使用数据清洗 请把 下面代码解除注释 上面的get_db函数注释
|
||||
# @pytest.fixture(scope="session")
|
||||
# def get_db():
|
||||
# """关于其作用域请移步查看官方文档"""
|
||||
# try:
|
||||
# db = DB()
|
||||
# yield db
|
||||
# finally:
|
||||
# db.close()
|
||||
|
||||
@pytest.fixture(params=ReadFile.read_testcase())
|
||||
def cases(request):
|
||||
|
|
Loading…
Reference in New Issue