Registry / testing / fastcov

fastcov

JSON →
library1.17pypypi✓ verified 85d ago

fastcov is a massively parallel gcov wrapper for generating intermediate coverage formats (like lcov info) quickly. It processes .gcda/.gcno files in parallel using subprocesses and hashes source files to avoid re-processing. Current version is 1.16, requires Python >=3.5, and is maintained on GitHub.

pip install fastcov
INSTALL
IMPORT
SIG · FASTCOV
F
fastcov
testingpythonv1.17
Install
1.5s avg
Import
89ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.092s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.086s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fastcov
import fastcov
from fastcov import fastcov
fastcov is a module, not a class; calling `fastcov.main()` is typical.

Run fastcov as a subprocess to generate lcov info output with branch coverage, excluding test files.

import subprocess subprocess.run(['fastcov', '--gcov', 'gcov', '--lcov', '-o', 'coverage.info', '--exclude', 'test', '--branch-coverage'], check=True)
fastcov --version
Debug
Known issues
breakingExit codes shifted in v1.7 to start at 3 (codes 1-2 reserved for shells). If you rely on exit codes, update your checks.
fix
Check for exit codes 3+ for failures, or use `--version` to detect version.
affects: >=1.7
deprecatedgcov shortform flags like `-i` (for intermediate format) may cause issues with GCC 11+. fastcov 1.14+ uses longform flags, but older versions might break.
fix
Upgrade to >=1.14 or set GCOV_PREFIX to include longform flags: `--gcov gcov --stdout --long-filename --preserve-paths`.
affects: <1.14
gotchaUsing `--zerocounters` with `--process-gcno` simultaneously can delete .gcno files (fixed in v1.14). Always verify you have backups.
fix
Upgrade to >=1.14, or avoid combining those flags.
affects: <1.14
gotchaIf gcov crashes or is killed, fastcov may hang forever (fixed in v1.11). For older versions, set a timeout on the subprocess call.
fix
Upgrade to >=1.11 or wrap subprocess with timeout.
affects: <1.11
Errors
Common errors & fixes
fastcov: error: unrecognized arguments: --branch-coverage
Older versions of fastcov did not support `--branch-coverage`; it was added later.
fix
Use `--branch` instead (alias) or upgrade fastcov to >=1.10.
AttributeError: module 'fastcov' has no attribute 'main'
Trying to call `fastcov.main()` directly but the module is not designed that way; fastcov is intended to be run as a CLI tool.
fix
Use subprocess to invoke fastcov or import the internal modules directly (not recommended).
KeyError: 'source_files'
Parsing fastcov's internal JSON output format yourself; the format changed in v1.5 to support test names.
fix
Use the lcov info output (`--lcov -o output.info`) or rely on the official fastcov JSON schema (if you must).
Upgrade
Version history
1.17latest on PyPI · released May 29, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
fastcov — pip install fastcov · libregistry