Skip to content

Commit f95e64b

Browse files
committed
Update.
1 parent 1ca930f commit f95e64b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

test/conftest.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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'))

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ uv_resolution =
4545
min: lowest-direct
4646

4747
commands =
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]
5151
runner = uv-venv-lock-runner

0 commit comments

Comments
 (0)