Skip to content

Commit 2f3ee02

Browse files
ammaraskarterryjreedyAlexWaygooderlend-aasland
authored
gh-106690: Add a .coveragerc file to the CPython repository (#8150)
The added file is the coverage default at some point in time + checking branches both ways + IDLE additions, labelled as such and somewhat designed to be unlikely to affect other files. Located in the CPython repository directory, it can be used where it is or copied elsewhere, depending on how one runs coverage. --------- Co-authored-by: Terry Jan Reedy <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 487861c commit 2f3ee02

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.coveragerc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
# Regexes for lines to exclude from consideration
6+
exclude_lines =
7+
# Don't complain if non-runnable code isn't run:
8+
if 0:
9+
if __name__ == .__main__.:
10+
11+
.*# pragma: no cover
12+
.*# pragma: no branch
13+
14+
# Additions for IDLE:
15+
.*# htest #
16+
if not (_htest or _utest):
17+
if not .*_utest:
18+
if .*_htest:
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add .coveragerc to cpython repository for use with coverage package.

0 commit comments

Comments
 (0)