Simple coverage Exclusions
This is a simple plugin for Coverage.py.
When you enable it, for example in pyproject.toml:
[tool.coverage.run]
plugins = ["coverage_simple_excludes"]
Then, in addition to the default # pragma: no cover, you get several more comments in the format
# cover-... that you can use to specify that lines or blocks of code should be excluded from
coverage, for example:
if sys.platform != 'win32': # cover-not-win32
print("This code is only executed on non-win32 systems")
else: # cover-only-win32
print("This code is only executed on win32 systems")
if sys.hexversion < 0x03_0C_00_00: # cover-req-lt3.12
print("This code is only executed on a version of Python before 3.12")
else: # cover-req-ge3.12
print("This code is only executed on Python 3.12 or later")
# cover-req-ltX.Yand# cover-req-geX.Y, where:XandYare the major and minor Python version, respectivelyltmeans "a Python version less than (<)X.Yis required for this line or block of code to be executed and included in the coverage check"gemeans "a Python version greater than or equal to (>=)X.Yis required"
# cover-not-Zand# cover-only-Z, where:notmeans "this code is not executed on this OS / platform / implementation"onlymeans "this code is only executed on this OS / platform / implementation"Zmay be any of the following values:os.name: "posix", "nt", "java"sys.platform: "aix", "android", "emscripten", "freebsd", "ios", "linux", "darwin", "win32", "cygwin", "wasi"sys.implementation.name: "cpython", "ironpython", "jython", "pypy"
Note the comments are case-sensitive. Any amount of whitespace is allowed between
the # and cover, including no space. The comments must always be followed by
whitespace or end-of-line. If you put any other comments after these comments,
for best forward compatibility it is strongly recommended you use another #,
for example: some_code() # cover-only-win32 # only executed on Windows.
Author, Copyright, and License
Copyright (c) 2024-2025 Hauke Dämpfling (haukex@zero-g.net) at the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB), Berlin, Germany, https://www.igb-berlin.de/
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/
Metadata
Release files for coverage-simple-excludes 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coverage_simple_excludes-1.1.1.tar.gz | 12.3 kB | Without provenance | Details for coverage_simple_excludes-1.1.1.tar.gz |
Release files / coverage_simple_excludes-1.1.1.tar.gz
| Download URL | coverage_simple_excludes-1.1.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
401e2ab99ba0f1b972262412f06bfe294e63ea2c718f8eb2e5b9f5367d8be4ac
|
|
BLAKE2b-256 checksum How to use checksums |
34b77b1460c3e7bb83b36c2b828a4e08c63ae6b3dcebcedf612ec31039b8434d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Security for coverage-simple-excludes 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.