Skip to content

Commit

Permalink
gh-106690: Add a .coveragerc file to the CPython repository (#8150)
Browse files Browse the repository at this point in the history
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 <tjreedy@udel.edu>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
  • Loading branch information
4 people committed Jul 13, 2023
1 parent 487861c commit 2f3ee02
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[run]
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

.*# pragma: no cover
.*# pragma: no branch

# Additions for IDLE:
.*# htest #
if not (_htest or _utest):
if not .*_utest:
if .*_htest:

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add .coveragerc to cpython repository for use with coverage package.

0 comments on commit 2f3ee02

Please sign in to comment.