Skip to content

pytest -Wall shows hundreds of warnings #2614

@simonw

Description

@simonw

Most of them are related to database connections not being closed: https://gist.github.com/simonw/cac417c8356493cc4b857f8477181f70

It ends like this:

....
tests/test_utils_permissions.py::test_multiple_plugins_with_own_parameters
  /Users/simon/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/lib/python3.13/subprocess.py:1137: ResourceWarning: subprocess 40454 is still running
    _warn("subprocess %s is still running" % self.pid,
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_utils_permissions.py::test_multiple_plugins_with_own_parameters
  /Users/simon/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/lib/python3.13/subprocess.py:1137: ResourceWarning: subprocess 40329 is still running
    _warn("subprocess %s is still running" % self.pid,
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
= 1518 passed, 8 skipped, 1 xfailed, 15 xpassed, 409 warnings in 120.15s (0:02:00) =

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions