与Force Nosetests to Use Python 2.7 instead of 3.4类似,我用python2编写了一些单元测试,我希望在python2中运行。但是,在默认情况下,nose2
的安装似乎试图运行python3。在
例如,如果我尝试运行unittest_controller.py
,那么输出的结尾是
Ran 4 tests in 1.552s
OK
然而,如果我使用来自同一目录的nose2
命令,我得到
^{pr2}$
因为StringIO
不再是Python3中的模块。如何使用Python2运行测试?在
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐