Skip to content

Commit 45a0ea9

Browse files
Migrate coveragepy config into pyproject.toml (#11025)
Co-authored-by: Adam Turner <[email protected]>
1 parent 3ec54f1 commit 45a0ea9

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,19 @@ markers = [
215215
"setup_command",
216216
]
217217
testpaths = ["tests"]
218+
219+
[tool.coverage.run]
220+
branch = true
221+
parallel = true
222+
source = ['sphinx']
223+
224+
[tool.coverage.report]
225+
exclude_lines = [
226+
# Have to re-enable the standard pragma
227+
'pragma: no cover',
228+
# Don't complain if tests don't hit defensive assertion code:
229+
'raise NotImplementedError',
230+
# Don't complain if non-runnable code isn't run:
231+
'if __name__ == .__main__.:',
232+
]
233+
ignore_errors = true

setup.cfg

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,3 @@ application-import-names = sphinx
66
import-order-style = smarkets
77
per-file-ignores =
88
tests/*: E501
9-
10-
[coverage:run]
11-
branch = True
12-
parallel = True
13-
source = sphinx
14-
15-
[coverage:report]
16-
exclude_lines =
17-
# Have to re-enable the standard pragma
18-
pragma: no cover
19-
# Don't complain if tests don't hit defensive assertion code:
20-
raise NotImplementedError
21-
# Don't complain if non-runnable code isn't run:
22-
if __name__ == .__main__.:
23-
ignore_errors = True

0 commit comments

Comments
 (0)