在所有子目录中运行notests

2024-04-19 06:04:37 发布

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

我可以使用nosetestsworkflow文件夹中运行测试:

workflow maks$ nosetests
..........
----------------------------------------------------------------------
Ran 10 tests in 0.093s

OK

我的测试位于test文件夹中:

workflow maks$ ls
__pycache__     iterations.py       test
data            iterationsClass.py  testData
env         iterationsClass.pyc

但当我转到父目录时:

(py3env)Makss-Mac:workflow maks$ cd ..

它找不到测试。

(py3env)Makss-Mac:Packages maks$ nosetests

----------------------------------------------------------------------
Ran 0 tests in 0.005s

OK

那么如何在所有子目录中进行notest搜索测试呢?


Tags: inpytest文件夹mactestsoknosetests