Skip to content

Commit bf05b66

Browse files
JonZeollaclaude
andcommitted
fix(config): restore coverage settings with filterwarning for subprocess-based tests
Keep --cov and fail_under=80. Add --cov=hooks alongside ai_native_python. Suppress the "No data was collected" CoverageWarning since tests invoke hooks via cookiecutter subprocess calls that coverage can't track directly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2e7c6a0 commit bf05b66

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ ignore = [
5151
plugins = []
5252

5353
[tool.pytest.ini_options]
54-
addopts = ""
54+
addopts = "--cov=ai_native_python --cov=hooks --cov-append --no-cov-on-fail --cov-fail-under=0 --cov-report=html --cov-report=xml --cov-report=term-missing"
5555
pythonpath = ['.']
56+
filterwarnings = [
57+
# Tests invoke hooks via cookiecutter subprocess, so coverage can't track them directly
58+
"ignore:No data was collected:coverage.exceptions.CoverageWarning",
59+
]
5660
markers = [
5761
"unit: marks tests as unit tests (deselect with '-m \"not unit\"')",
5862
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
@@ -77,6 +81,9 @@ dev = [
7781
"refurb",
7882
]
7983

84+
[tool.coverage.report]
85+
fail_under = 80
86+
8087
[tool.pyright]
8188
include = ["ai_native_python", "tests", "hooks"]
8289
exclude = ["**/__pycache__"]

0 commit comments

Comments
 (0)