SmartRedis icon indicating copy to clipboard operation
SmartRedis copied to clipboard

CI/CD tests produce deprecation warnings

Open billschereriii opened this issue 1 year ago • 4 comments

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

billschereriii avatar Jun 27 '23 17:06 billschereriii

This appears to be specific to the code coverage package we're using and not part of the SmartRedis code itself

billschereriii avatar Jun 30 '23 15:06 billschereriii

@billschereriii Let's update / change this to do an investigation of dependency update.

mellis13 avatar Jul 17 '23 17:07 mellis13

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.

billschereriii avatar Dec 08 '23 19:12 billschereriii

The warning appears as part of the PyTest summary after completing tests.

billschereriii avatar Dec 08 '23 19:12 billschereriii