允许在“nosetest”期间插入警告筛选器。
nose_warnings_filters的Python项目详细描述
放入与^{tt2}中的warnings.filterwarnings相同的参数$ 在你的项目的根。用管道|分隔每个参数,一个 每行过滤。空格被去掉。
例如:
[nosetests] warningfilters=default |.* |DeprecationWarning |notebook.* ignore |.*metadata.* |DeprecationWarning |notebook.* once |.*schema.* |UserWarning |nbfor.* error |.*warn.* |DeprecationWarning |notebook.services.contents.manager*
如果您喜欢配置文件的另一个名称,可以告诉nose 要使用-c标志加载配置,请使用 nosetests -c nose.cfg。
详细配置。
告警过滤器的每一行最大4节分开, 匹配filterwarnings:
的前4个部分filterwarnings(action,message="",category=Warning,module="",lineno=0,append=False)
字段2到4可以省略,即1行可以是 表格:
action action| message action| message | category action| message | category | module
每个字段的值与^{tt7}的相同$ 除外:-空格被修剪。-如果category有点,则 尝试导入相应的类。如果没有圆点, 在builtins或__builtins__
中查找名称测试失败
由于某些原因,在某些系统中测试失败;看起来 包裹难以自测。可能是因为 测试包需要位于不同的名称空间中,并且 自我测试我们打破了这个假设。
主页:https://github.com/Carreau/nose_warnings_filters 作者:Matthias Bussonnier 作者电子邮件:bussonniermatthias@gmail.com 许可证:麻省理工学院 描述:未知 平台:未知 需要python:>;=2.7