我试图让鼻子测试来识别我的测试,但它没有正确运行我的任何测试。
我有以下文件结构
Project
+----Foo/
+----__init__.py
+----bar.py
+----test/
+----__init__.py
+----unit/
+----__init__.py
+----bar_test.py
+----functional/
+----__init__.py
+----foo_test.py
在 bar_test.py 中
class BarTest(unittest.TestCase):
def bar_1_test():
...
在 foo_test.py 中
class FooFTest.py
def foo_1_test():
...
使用鼻子测试的 -m、-i、-e 选项
- 什么是我只需要运行单元测试的正则表达式(在单元/,类 BarTest 中的测试)
- 什么是我只需要运行功能测试的正则表达式(在功能/下,FooFTest 类中的测试)
我尝试了各种组合,但似乎无法让鼻子测试始终如一地做我想做的事