[html]
show_contexts = true
skip_covered = false

[paths]
_site-packages-to-src-mapping =
  .
  */lib/pypy*/site-packages
  */lib/python*/site-packages
  *\Lib\site-packages

[report]
exclude_also =
    if TYPE_CHECKING
    assert False
    : \.\.\.(\s*#.*)?$
    ^ +\.\.\.$
# fail_under = 98.95
skip_covered = true
skip_empty = true
show_missing = true

[run]
branch = true
# `pytest-cov` switches contexts through `Coverage.switch_context()` at
# runtime (see `--cov-context=test` in `pytest.ini`) rather than through the
# `dynamic_context` setting below. Coverage's core selection only inspects
# that setting, so on Python 3.14 it picks `sysmon`, which cannot record
# dynamic contexts, and then warns from every `switch_context()` call. With
# `filterwarnings = error` that turns each test into an error. `ctrace`
# reports `supports_dynamic_contexts`, and falls back to `pytrace` (which
# also supports them) where the C tracer is unavailable, such as PyPy.
# NOTE: Coveragepy is incompatible with dynamic context that gets enabled via
# NOTE: `pytest-cov` through a CLI arg to pytest. Refs:
# * https://github.com/aio-libs/multidict/pull/1393
# * https://github.com/pytest-dev/pytest-cov/issues/755
# * https://coverage.rtfd.io/en/latest/changes.html#version-7-15-3-2026-08-02
# * https://github.com/coveragepy/coveragepy/issues/2200
# * https://github.com/coveragepy/coveragepy/pull/2234
core = ${COVERAGE_CORE-ctrace}
cover_pylib = false
# https://coverage.rtfd.io/en/latest/contexts.html#dynamic-contexts
# dynamic_context = test_function  # conflicts with `pytest-cov` if set here
omit =
  setup.py
  # FIXME: migrate to a snapshotting plugin. See #922, #924 and #938.
  tests/gen_pickles.py
parallel = true
# plugins =
#   covdefaults
relative_files = true
source =
  .
source_pkgs =
  multidict
