在python中使用xml test runner时出现脚本错误

2024-09-29 17:19:30 发布

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

我使用xml test runner在单元测试后生成xml报告:

https://pypi.python.org/pypi/XmlTestRunner

不过,我只是犯了个错误:

SyntaxError ( ('future feature unicode_literals is not defined'

如果你看一下脚本,你可以看到一行:

from __future__ import unicode_literals

unicode_literals导入有什么问题?你知道吗


Tags: httpsorgtestpypi报告错误unicodefuture
1条回答
网友
1楼 · 发布于 2024-09-29 17:19:30

您似乎正在使用早于2.6.0的Python版本。unicode_literals未来导入最早出现在2.6.0中。你知道吗

如果希望脚本运行,请将Python升级到最新版本。你知道吗

相关问题 更多 >

    热门问题