diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2023-07-13 15:45:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 15:45:21 (GMT) |
commit | 2f3ee02c22c4b42bf6075a75104c3cfbb4eb4c86 (patch) | |
tree | 2bded28524fbec90e1766ce2dec7c5a1463b40f4 | |
parent | 487861c6aef2fbcd92ccabb05ea1b57d18299b29 (diff) | |
download | cpython-2f3ee02c22c4b42bf6075a75104c3cfbb4eb4c86.zip cpython-2f3ee02c22c4b42bf6075a75104c3cfbb4eb4c86.tar.gz cpython-2f3ee02c22c4b42bf6075a75104c3cfbb4eb4c86.tar.bz2 |
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 <tjreedy@udel.edu>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
-rw-r--r-- | .coveragerc | 19 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2023-07-12-14-07-07.gh-issue-106690.NDz-oG.rst | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..18bf2f4 --- /dev/null +++ b/.coveragerc @@ -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: + diff --git a/Misc/NEWS.d/next/Tests/2023-07-12-14-07-07.gh-issue-106690.NDz-oG.rst b/Misc/NEWS.d/next/Tests/2023-07-12-14-07-07.gh-issue-106690.NDz-oG.rst new file mode 100644 index 0000000..e7dc0ac --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2023-07-12-14-07-07.gh-issue-106690.NDz-oG.rst @@ -0,0 +1 @@ +Add .coveragerc to cpython repository for use with coverage package. |