鼻子有一个all-modules = 1配置值,这使它的测试收集器可以在所有文件中查找,而不仅仅是遵循其命名约定的文件。http://nose.readthedocs.org/en/latest/plugins/allmodules.html
用pytest做到这一点的等效方法是什么?即我不想在切换到pytest时重命名我们所有的测试模块。
按照:http : //doc.pytest.org/en/latest/reference.html#confval-python_files
我已将以下行添加到我的setup.cfg
文件中:
[pytest]
python_files=*py
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句