Python鼻子配置文件只允许WHERE指定一次

时间:2015-09-27 20:36:46

标签: python nose

在nose.cfg中

[nosetests]
where=path1
where=path2
where=path3

仅使用最后一个定义。文档说--where标志可以多次使用,但这似乎不适用于配置文件?

1 个答案:

答案 0 :(得分:3)

支持多个“where”参数为deprecated

warn("Use of multiple -w arguments is deprecated and "
     "support may be removed in a future release. You can "
     "get the same behavior by passing directories without "
     "the -w argument on the command line, or by using the "
     "--tests argument in a configuration file.",
     DeprecationWarning)

指定where一次 - 定义工作目录并定义tests下的其他路径:

[nosetests]
where=path1
tests=path2,path3