python - 什么是 __multicall__ 参数以及为什么不推荐使用它?

标签 python pytest

我将 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 插件会触发它 它应该得到更新

关于python - 什么是 __multicall__ 参数以及为什么不推荐使用它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43009164/

相关文章:

python-3.x - Python调用模拟 "="未调用结果

python - 如何在 "setup"方法中使用 monkeypatch 使用 pytest 进行单元测试?

python - 在 Python 中,什么是 `sys.maxsize` ?

python - 如何在 pytest 中为模拟函数提供不同的返回值?

docker - 使用 VS Code 在 docker 容器中调试 Pytest

python - 如何配置 PyCharm 以运行 py.test 测试?

python - PDF 打印受密码保护的页面(最好让 wkhtmltopdf 使用 cookie)

python - 如何使文本框成为选择字段?

jquery - Flask如何在ajax调用后重定向到新页面

python - 如何仅在一天中的特定时间运行 Python 脚本?