Skip to content

Commit eaf4048

Browse files
committed
fix coverage
1 parent bab4e1b commit eaf4048

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: pip install ".[test]" pytest-cov
3434

3535
- name: Run tests
36-
run: pytest -v --tb=short --cov=rehline --cov-report=xml --cov-report=term
36+
run: pytest -v --tb=short --cov-report=xml
3737

3838
- name: Upload coverage to Codecov
3939
if: success()

pyproject.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,30 @@ py-modules = ["build"]
3434
build = "cp*"
3535

3636
[project.optional-dependencies]
37-
test = ["pytest >= 7.0", "pandas >= 1.5.0"]
37+
test = ["pytest >= 7.0", "pandas >= 1.5.0", "pytest-cov"]
3838

3939
[tool.pytest.ini_options]
4040
testpaths = ["tests"]
4141
python_files = ["test_*.py"]
4242
python_classes = ["Test*"]
4343
python_functions = ["test_*"]
44+
addopts = "--cov=rehline --cov-report=term-missing"
4445

4546
[build-system]
4647
requires = ["requests ~= 2.31.0", "pybind11 ~= 3.0.0", "setuptools >= 80.0.0", "wheel >= 0.42.0", "setuptools-scm >= 8.0"]
4748
build-backend = "setuptools.build_meta"
4849

50+
# --- Coverage ---
51+
[tool.coverage.run]
52+
source = ["rehline"]
53+
omit = ["rehline/_internal*"]
54+
55+
[tool.coverage.report]
56+
exclude_lines = [
57+
"pragma: no cover",
58+
"if TYPE_CHECKING:",
59+
]
60+
4961
# --- Ruff (linter + formatter) ---
5062
[tool.ruff]
5163
target-version = "py310"

0 commit comments

Comments
 (0)