且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

鼻子无法在Ubuntu中找到测试

更新时间:2023-10-22 23:17:58

一些相关的内容,如果您要在目录之外运行测试,即

Some what related, if you're running tests off of a directory i.e

nosetests ... tests/

其中tests是我的测试文件夹的名称,并且在.py模块之一中具有单独的python测试功能...您的功能必须以'test'开头,以便进行鼻子测试才能将其识别为您想要的测试跑步.

where tests is the name of the folder with my tests, and have separate python test functions in one of the .py modules... Your functions have to start with 'test' for nosetests to recognize that as a test you want to run.

例如:

 def test_something():
    ...

在此目录中执行时,nosetestest将运行此功能

nosetests will run this function when executed in this directory while

 def somethin_to_test():
    ...

不会.