This package installs a pth file that enables the coveragepy process_startup feature in this python prefix/virtualenv in subsequent runs.
See: http://nedbatchelder.com/code/coverage/subprocess.html
Demo:
$ virtualenv tmpenv
$ . tmpenv/bin/activate
$ pip install coverage-enable-subprocess
$ touch .coveragerc
$ export COVERAGE_PROCESS_START=$PWD/.coveragerc
$ echo 'print("oh, hi!")' > ohhi.py
$ python ohhi.py
oh, hi!
$ coverage report
Name Stmts Miss Cover
-----------------------------------------------------
/etc/python2.6/sitecustomize.py 5 1 80%
ohhi.py 1 0 100%
tmpenv/lib/python2.6/site.py 433 392 9%
-----------------------------------------------------
TOTAL 439 393 10%
For projects that need to cd during their test runs, and run many processes in parallel, I ensure a $TOP variable is exported, and I use this .coveragerc:
[run]
parallel = True
branch = True
data_file = $TOP/.coverage
[report]
exclude_lines =
# Have to re-enable the standard pragma
\#.*pragma:\s*no.?cover
# we can't get coverage for functions that don't return:
\#.*never returns
\#.*doesn't return
# Don't complain if tests don't hit defensive assertion code:
^\s*raise Impossible\b
^\s*raise AssertionError\b
^\s*raise NotImplementedError\b
^\s*return NotImplemented\b
# Don't complain if tests don't hit re-raise of unexpected errors:
^\s*raise$
# if main is covered, we're good:
^\s*exit\(main\(\)\)$
show_missing = True
[html]
directory = $TOP/coverage-html
# vim:ft=dosini
Metadata
Release files for coverage_enable_subprocess 1.0
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_enable_subprocess-1.0.tar.gz | 2.7 kB | Without provenance | Details for coverage_enable_subprocess-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coverage_enable_subprocess-1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for coverage_enable_subprocess-1.0-py2.py3-none-any.whl |
Total release size: 6.7 kB
Release files / coverage_enable_subprocess-1.0.tar.gz
| Download URL | coverage_enable_subprocess-1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdbd3dc9532007cd87ef84f38e16024c5b0ccb4ab2d1755225a7edf937acc011
|
|
BLAKE2b-256 checksum How to use checksums |
31f457693bcf041ba641501b7a2fafc9d3d2de647355d78c6a2e07fb53648eaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / coverage_enable_subprocess-1.0-py2.py3-none-any.whl
| Download URL | coverage_enable_subprocess-1.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
27982522339ec77662965e0d859da5662162962c874d54d2250426506818cbdc
|
|
BLAKE2b-256 checksum How to use checksums |
3158d8dd7edbf5e120942b6395b4c034506c68e56f656074522c83b59d9a4991
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for coverage_enable_subprocess 1.0
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.