Currently, pytest issues 3 warnings after running the tests in CI (Linux, macOS, Windows):
../.cache/pypoetry/virtualenvs/dangerzone-3aSsmiER-py3.8/lib/python3.8/site-packages/pytest_cov/plugin.py:256
/home/circleci/.cache/pypoetry/virtualenvs/dangerzone-3aSsmiER-py3.8/lib/python3.8/site-packages/pytest_cov/plugin.py:256: 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):
../.cache/pypoetry/virtualenvs/dangerzone-3aSsmiER-py3.8/lib/python3.8/site-packages/pytest_cov/plugin.py:265
/home/circleci/.cache/pypoetry/virtualenvs/dangerzone-3aSsmiER-py3.8/lib/python3.8/site-packages/pytest_cov/plugin.py:265: 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):
tests/test_settings.py::test_new_default_setting
/home/circleci/project/tests/test_settings.py:77: PytestMockWarning: Mocks returned by pytest-mock do not need to be used as context managers. The mocker fixture automatically undoes mocking at the end of a test. This warning can be ignored if it was triggered by mocking a context manager. https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager
with mocker.patch(
The last warning is resolved by not using mocker.patch as a context manager. There is only one such case, elsewhere (e.g.) it is already used correctly.
Currently, pytest issues 3 warnings after running the tests in CI (Linux, macOS, Windows):
The first two warnings are resolved by updating pytest-cov version (this issue was resolved in pytest-cov 4.0.0, but I've bumped it to the latest (5.0.0)).
The last warning is resolved by not using
mocker.patch
as a context manager. There is only one such case, elsewhere (e.g.) it is already used correctly.