============================= test session starts ==============================
platform darwin -- Python 3.13.16, pytest-9.2.0, pluggy-1.7.0
rootdir: /work/pytest/warn
plugins: platformdirs-4.14.5, cov-7.1.0, xdist-3.8.0
collected 2 items

test_a.py ..                                                             [100%]

=============================== warnings summary ===============================
test_a.py::test_w
  /work/pytest/warn/test_a.py:4: DeprecationWarning: old api
    warnings.warn("old api", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================= 2 passed, 1 warning in 0.14s =========================
