File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """Pytest hooks shared by this package's tests."""
2+
3+ from __future__ import annotations
4+
5+ import os
6+ from pathlib import Path
7+
8+ # CLI tests run subprocesses with cwd under tmp_path (outside the repo). Coverage
9+ # discovers [tool.coverage] from the process cwd, so those children would default to
10+ # line-only / non-parallel data and pytest-cov then fails on combine with arc data from
11+ # the parent. Point subprocess coverage at the project config explicitly.
12+ _ROOT = Path (__file__ ).resolve ().parents [1 ]
13+ os .environ .setdefault ('COVERAGE_RCFILE' , str (_ROOT / 'pyproject.toml' ))
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ uv_resolution =
4545 min: lowest-direct
4646
4747commands =
48- pytest -m " not s3" --cov =modelarrayio --cov-report =term-missing --cov-report =xml {posargs:test}
48+ pytest -m " not s3" --cov =modelarrayio --cov-config ={toxinidir}/pyproject.toml -- cov- report =term-missing --cov-report =xml {posargs:test}
4949
5050[testenv:lint]
5151runner = uv-venv-lock-runner
You can’t perform that action at this time.
0 commit comments