我将 pytest 用作我的应用程序的一部分。我创建了一些固定装置以在内部测试中使用,然后运行 pytest.main 进行一些测试。
插件:
class MyPlugin(object):
def __init__(self):
...some code here
@pytest.fixture
def fixture1(self, request):
return self.something
调用pytest:
plugin = MyPlugin()
pytest.main(cmdline, plugins=[plugin])
我在使用 pytest 运行的每个应用程序上收到警告:
WI1/usr/lib/python2.7/dist-packages/pytest_timeout.py:68 'pytest_runtest_protocol' Hook 使用已弃用的 __multicall__ 参数
那是什么,为什么会这样,如何解决?
请您参考如下方法:
您使用的 pytest_timeout 插件会触发它 它应该得到更新
