这是我的测试脚本:@pytest.mark.parametrize('data', [0, 1], ids=['有效', '无效'])def test_a(data): assert 1但每个ID的名称在Pycharm和Terminal中均被转义:那么,如何解决呢?
1 回答

FFIVE
TA贡献1797条经验 获得超6个赞
自2019年4月起,pytest通过以下配置设置pytest.ini
或其他配置支持此功能:
disable_test_id_escaping_and_forfeit_all_rights_to_community_support = True
使用该配置,问题中的示例无需更改即可按设计工作。
添加回答
举报
0/150
提交
取消