pytest unicode syntaxerror,带“£”symb

2024-04-25 21:29:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个测试文件:test_pytest.py

def test_pytest():
    s = '£'
    assert True

使用pytest,我这样运行它:python -m pytest test_pytest.py

结果是:

^{pr2}$

什么给予?在

注意,注释s='£'允许测试通过


Tags: 文件pytesttruepytestdefassert测试通过