Skip to content

Commit 7935b44

Browse files
DevOpsDerekCopilot
andcommitted
fix: replace --cov-omit CLI flag with pyproject.toml coverage config
pytest-cov 7.x dropped --cov-omit as a CLI argument; coverage omit patterns now live in [tool.coverage.run] in pyproject.toml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ffe3086 commit 7935b44

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ jobs:
7777
--tb=short \
7878
--cov=. \
7979
--cov-report=term-missing \
80-
--cov-report=xml \
81-
--cov-omit="tests/*,exercises/*/exercise.py,lint.py"
80+
--cov-report=xml
8281
8382
- name: Upload coverage report
8483
# Only upload from one matrix entry to avoid duplicates

‎pyproject.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ testpaths = ["tests"]
5353
addopts = "-v --tb=short"
5454
# Exercise starter files contain intentional incomplete code — don't collect them
5555
norecursedirs = ["exercises"]
56+
57+
[tool.coverage.run]
58+
source = ["."]
59+
omit = ["tests/*", "exercises/*/exercise.py", "lint.py"]
60+
61+
[tool.coverage.report]
62+
show_missing = true

0 commit comments

Comments
 (0)