繁体   English   中英

在Ubuntu上的py.test

[英]py.test on Ubuntu

我尝试使用py.test在Ubuntu上运行一系列测试用例,但没有从文件夹中收集测试用例。 我使用unittest编写测试用例。

在Windows上,我使用以下命令:

py.test –v "folder with test cases" > log_file.txt

Windows的输出:

============================= test session starts =============================
platform win32 -- Python 2.6.3 -- py-1.4.20 -- pytest-2.5.2 -- C:\Python26\python.exe
plugins: capturelog
collecting ... collected 27 items

在Ubuntu上执行相同的命令,输出为:

============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- pytest-1.3.4
test path 1: TestScenario01/

===============================  in 0.01 seconds ===============================

我使用不同的Python版本,因为在Windows Scapy中仅适用于Python 2.6。 另一个区别是在Windows上出现py-1.4.20和pytest-2.5.2。 我也将它们安装在Ubuntu上。

我设法开始测试。 我必须删除旧的py-1.3.4模块并安装py-1.4.2,还必须将pytest升级到版本2.5.2。 现在可以了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM