我试图将鼻子测试限制到特定目录,但是在测试运行期间它包括我要定位的目录的父目录,这样做会引发错误。
以下是测试运行输出的关键元素:
nose.importer: DEBUG: Add path /projects/myproject/myproject/specs
nose.importer: DEBUG: Add path /projects/myproject/myproject
nose.importer: DEBUG: Add path /projects/myproject
nose.importer: DEBUG: insert /projects/myproject into sys.path
我正在buildout
使用pbp.recipe.noserunner
. 这是相关/projects/myproject/buildout.cfg
部分:
[specs]
recipe = pbp.recipe.noserunner
eggs =
pbp.recipe.noserunner
${buildout:eggs}
figleaf
pinocchio
working-directory =
myproject/specs
defaults =
-vvv
--exe
--include ^(it|ensure|must|should|specs?|examples?)
--include (specs?(.py)?|examples?(.py)?)$
--with-spec
--spec-color
我也尝试设置where=myproject/specs
为defaults
参数之一来帮助限制导入,但仍然没有乐趣。
关于我要去哪里错的任何建议?
编辑:
我已经尝试过--exclude
父目录,但没有任何乐趣。