【pytest】UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xae in position 22: illegal multibyte seq

windwos 系统

运行 pytest 测试用例报错:

File "D:\Program Files\JetBrains\PyCharm 2019.1.2\helpers\pycharm\_jb_pytest_runner.py", line 37, in <module>

    config_result = real_prepare_config(args, plugins_to_load)

...

解决办法:

pytest.ini 文件内删除中文注释,用英文注释替代。

猜你喜欢

转载自blog.csdn.net/lan_yangbi/article/details/122039502