9
我试图限制nosetests到一个特定的目录,但是在测试运行期间它包括目标的目录的父目录,并在这样做会引发错误。Nosetest包括不需要的父目录
这里输出的关键要素,从试运行:
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
父目录,但没有喜悦。
谢谢;我应该意识到最好的调查方法是阅读源代码! – 2011-06-10 07:56:00
那么,确保你没有'__init __。py'(或'__init __。pyc'),它不是必需的,对吗? – Danimal 2015-07-28 11:06:58