reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
94 stars 103 forks source link

Change pytest.mark.optionalhook to pytest.hookimpl to resolve PytestDeprecationWarning #337

Closed ogajduse closed 1 year ago

ogajduse commented 1 year ago

This patch resolves the deprecation warning below.

/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/pytest_reportportal/plugin.py:46: PytestDeprecationWarning: The hookimpl pytest_configure_node uses old-style configuration options (marks or attributes).
  Please use the pytest.hookimpl(optionalhook=True) decorator instead
   to configure the hooks.
   See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
    @pytest.mark.optionalhook

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html