2024-04-25 21:29:57 发布
网友
我有一个测试文件:test_pytest.py:
test_pytest.py
def test_pytest(): s = '£' assert True
使用pytest,我这样运行它:python -m pytest test_pytest.py
python -m pytest test_pytest.py
结果是:
什么给予?在
注意,注释s='£'允许测试通过
s='£'
我真傻,我的Vim用拉丁1编码而不是utf-8保存文件。将文件的编码改为utf-8解决了这个问题。在
我真傻,我的Vim用拉丁1编码而不是utf-8保存文件。将文件的编码改为utf-8解决了这个问题。在
相关问题 更多 >
编程相关推荐