From 88393015d63d7b0686196f7fae8377125877ba1e Mon Sep 17 00:00:00 2001 From: GergelyKalmar Date: Wed, 30 Nov 2022 17:00:07 +0100 Subject: [PATCH] Fix deprecation warning --- pytest_factoryboy/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_factoryboy/plugin.py b/pytest_factoryboy/plugin.py index 3123417..5faa0f5 100644 --- a/pytest_factoryboy/plugin.py +++ b/pytest_factoryboy/plugin.py @@ -110,7 +110,7 @@ def factoryboy_request() -> Request: return Request() -@pytest.mark.tryfirst +@pytest.hookimpl(tryfirst=True) def pytest_runtest_call(item: Item) -> None: """Before the test item is called.""" # TODO: We should instead do an `if isinstance(item, Function)`.