在nose.cfg
[nosetests]
where=path1
where=path2
where=path3
仅使用最后一个定义.文档说–where标志可以多次使用,但这在配置文件中似乎不起作用?
解决方法:
支持多个“ 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)
指定一次位置-定义工作目录并定义要测试的其他路径:
[nosetests]
where=path1
tests=path2,path3