SmartRedis
SmartRedis copied to clipboard
CI/CD tests produce deprecation warnings
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
This appears to be specific to the code coverage package we're using and not part of the SmartRedis code itself
@billschereriii Let's update / change this to do an investigation of dependency update.
The warning is coming when you run Python tests, but is generated against ../../../../../opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pytest_cov/plugin.py
which is not source code that is under our control.
The warning appears as part of the PyTest summary after completing tests.