今天我日常的开心敲代码 开启我编写的 接口测试用例
然后很懵逼的一片红
报的错误是:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecate
d, and in 3.8 it will stop working
是由于 python版本更新导致的 错误 警告可以忽略
搞了一个上午搜天 搜地 搜空气
最终查了下pytest的官方接口文档
要在pytest.ini的文件下填写该内容:
[pytest]
addopts = -p no:warnings
忽视所有的警告
然后
有一种 莫名奇妙 我为什么要遇到这种问题的感觉 这就是吃翔的感觉吗? 物理吐槽 pytest的设定人的脑壳