解决方法:
在报警告的文件头里导入warnings模块,然后调用忽略warnings函数
import warnings
def XXX(self):
warnings.simplefilter('ignore', ResourceWarning)
解决方法:
在报警告的文件头里导入warnings模块,然后调用忽略warnings函数
import warnings
def XXX(self):
warnings.simplefilter('ignore', ResourceWarning)
本文标题:Python3 使用unittest时,没有报错,但提示:Res
本文链接:https://www.haomeiwen.com/subject/ujihyktx.html
网友评论