From e027adc8dc46e40ca2e2555eacef0fe46203fb7b Mon Sep 17 00:00:00 2001 From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com> Date: Mon, 9 Jun 2025 21:05:43 +0700 Subject: [PATCH] fix(pytest): fixture title issue in pytest>=8.4 --- allure-pytest/src/helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/allure-pytest/src/helper.py b/allure-pytest/src/helper.py index e6944ef4..a9df4b7e 100644 --- a/allure-pytest/src/helper.py +++ b/allure-pytest/src/helper.py @@ -10,7 +10,9 @@ class AllureTitleHelper: def decorate_as_title(self, test_title): def decorator(func): # pytest.fixture wraps function, so we need to get it directly - if getattr(func, '__pytest_wrapped__', None): + if hasattr(func, "_get_wrapped_function"): # pytest >= 8.4 + function = func._get_wrapped_function() + elif hasattr(func, "__pytest_wrapped__"): # pytest < 8.4 function = func.__pytest_wrapped__.obj else: function = func