From 512ad53dfa3e80556a79bb7cf97d013fdf09dda0 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 17 Oct 2024 15:54:19 +0300 Subject: [PATCH] Fix for Python 3.7 --- pytest_reportportal/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index ab927a3..db6ee71 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -326,6 +326,7 @@ def report_fixture(request: FixtureRequest, name: str, error_msg: str) -> None: reporter.finish_nested_step(item_id, timestamp(), 'FAILED') +# no 'fixturedef' type for backward compatibility for older pytest versions @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup(fixturedef, request: FixtureRequest) -> None: yield from report_fixture( @@ -333,6 +334,7 @@ def pytest_fixture_setup(fixturedef, request: FixtureRequest) -> None: f'{fixturedef.scope} fixture setup failed: {fixturedef.argname}') +# no 'fixturedef' type for backward compatibility for older pytest versions @pytest.hookimpl(hookwrapper=True) def pytest_fixture_post_finalizer(fixturedef, request: FixtureRequest) -> None: yield from report_fixture(