update test/conftest.py.

增加不使用数据清洗功能注释代码说明
This commit is contained in:
zy7y 2021-05-17 10:06:32 +08:00 committed by Gitee
parent e0a245de6d
commit e61b512983
1 changed files with 10 additions and 1 deletions

View File

@ -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):