Open
Description
Description
Running our unit tests on CI/CD produces deprecation warnings
How to reproduce
Run tests on CI/CD and observe the output. You should find something similar to the following:
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pytest_cov/plugin.py:233: PytestDeprecationWarning: The hookimpl CovPlugin.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
def pytest_configure_node(self, node):
../../../../../opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pytest_cov/plugin.py:242
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pytest_cov/plugin.py:242: PytestDeprecationWarning: The hookimpl CovPlugin.pytest_testnodedown 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
def pytest_testnodedown(self, node, error):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Expected behavior
Running tests shouldn't produce deprecation warnings. Test code should be tweaked to not generate these warnings