【发布时间】:2011-06-08 20:03:19
【问题描述】:
我正在尝试将鼻子测试限制到特定目录,但是在测试运行期间它包括我要定位的目录的父目录,这样做会引发错误。
以下是测试运行输出的关键元素:
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 父目录但没有乐趣。
【问题讨论】: