-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.cfg
More file actions
37 lines (34 loc) · 1.39 KB
/
Copy pathsetup.cfg
File metadata and controls
37 lines (34 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[tool:pytest]
# Default test paths
testpaths = tests
# Coverage is opt-in (run with --cov to enable) but the target and report
# format are pre-configured so the flags don't need to be repeated each time.
# Usage:
# pytest --cov # term-missing report (default)
# pytest --cov --cov-report=html # HTML report in htmlcov/
# pytest --cov --cov-report=xml # Cobertura XML (for CI)
addopts =
--cov-report=term-missing
[coverage:run]
# Measure coverage of the test infrastructure only.
# The Hugo template (the real "code under test") is not Python and cannot
# be measured by coverage.py; its branch coverage is tracked structurally
# by having one fixture file per Schema.org type.
source = tests
omit =
tests/public_test/*
[coverage:report]
# Lines that are only reachable when the test infrastructure itself fails
# (e.g., "built page not found" guards, JSONDecodeError handlers) are
# expected to be uncovered during a normal green run. Exclude them so
# the coverage percentage reflects meaningful, reachable logic.
exclude_lines =
# Standard pragma
pragma: no cover
# pytest skip/fail paths – only reached when setup is broken
pytest\.skip\(
pytest\.fail\(
# Defensive parser error handler – only reached on malformed HTML
except json\.JSONDecodeError
# YAML parse errors – only reached on malformed front matter
return \{