Commit 7798cfa5 by 文鑫

增加conftest、pytest.ini文件

parent ecd1f07b
# _*_ coding:utf-8 _*_
_author_ = 'wenxin'
_date_ = '2020/7/10 16:15'
def pytest_collection_modifyitems(items):
"""
测试用例收集完成时,将收集到的item的name和nodeid的中文显示在控制台上
:return:
"""
for item in items:
item.name = item.name.encode("utf-8").decode("unicode_escape")
print(item.name)
item._nodeid = item.nodeid.encode("utf-8").decode("unicode_escape")
print(item._nodeid)
\ No newline at end of file
# pytest.ini
[pytest]
addopts = --alluredir ./report --clean-alluredir
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment