在这种情况下,pytest-warnings是为pytest和/或它的插件生成的警告。您的代码未生成这些警告。为了在报告中列出它们,您需要使用选项-r w。这里是py.test的一部分–help:
-r chars show extra test summary info as specified by chars (f)ailed,
(E)error, (s)skipped, (x)failed, (X)passed
(w)pytest-warnings (a)all.
这将允许在报告中显示警告(记录的顶部)将列出哪些pytest插件使用不推荐的参数(在我的例子中)
...
================================ pytest-warning summary ================================
WI1 /Projects/.tox/py27/lib/python2.7/site-packages/pytest_timeout.py:68 'pytest_runtest_protocol' hook uses deprecated __multicall__ argument
WI1 /Projects/.tox/py27/lib/python2.7/site-packages/pytest_capturelog.py:171 'pytest_runtest_makereport' hook uses deprecated __multicall__ argument
...