diff --git a/flaky/flaky_pytest_plugin.py b/flaky/flaky_pytest_plugin.py index bacf8eb..193d438 100644 --- a/flaky/flaky_pytest_plugin.py +++ b/flaky/flaky_pytest_plugin.py @@ -269,7 +269,7 @@ def call_runtest_hook(self, item, when, **kwds): """ hookname = "pytest_runtest_" + when ihook = getattr(item.ihook, hookname) - call_info = CallInfo( + call_info = getattr(CallInfo, "from_call", CallInfo)( lambda: ihook(item=item, **kwds), when=when, )