我有一个要移植到 nose2 的 nose.cfg 文件。我在 the nose2 docs 中看不到任何方式忽略文件或目录。
在 Nose 1 中,这是通过这两个标志完成的:
ignore-files=settings_test*
exclude-dir=ignorethisdir
这在 nose2 中如何完成?
最佳答案
exclude-dir 在安装 nose-exclude 时可用。此插件目前仅适用于 nose1:https://bitbucket.org/kgrandis/nose-exclude/overview
可用的是定义:
__test__ = 假
在每个 TestCase 或 TestSuite 继承类中。
它们必须从这些类继承才能工作。这是由 nose2 附带的 dundertest 插件提供的,默认情况下启用。
关于python - 如何忽略 nose2 中的文件或目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20180657/