From 003bbe694a67b72b88ed910a5388fcfef8ae52b7 Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Mon, 12 Feb 2024 21:29:45 -0600 Subject: [PATCH] Use pytest_runtest_call --- src/pytest_codspeed/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pytest_codspeed/plugin.py b/src/pytest_codspeed/plugin.py index 5d8e6af..0670492 100644 --- a/src/pytest_codspeed/plugin.py +++ b/src/pytest_codspeed/plugin.py @@ -228,7 +228,10 @@ def pytest_runtest_protocol(item: pytest.Item, nextitem: pytest.Item | None): assert plugin.lib is not None runtest_call = pytest.CallInfo.from_call( lambda: _run_with_instrumentation( - plugin.lib, item.nodeid, item.config, item.runtest + plugin.lib, + item.nodeid, + item.config, + lambda: ihook.pytest_runtest_call(item=item), ), "call", )