SlipCover

raw JSON →
1.0.18 verified Sat May 09 auth: no python

Near zero-overhead Python code coverage tool that uses bytecode instrumentation to measure line and branch coverage with minimal performance impact. Current version 1.0.18, supports Python 3.8 to 3.14, maintained actively on GitHub.

pip install slipcover
error ValueError: line ..., column ...-... is not a valid range
cause Bug in SlipCover versions <1.0.11 on Python 3.12+ when parsing bytecode ranges.
fix
Upgrade to slipcover>=1.0.11
error dlopen(/opt/homebrew/lib/python3.11/site-packages/slipcover/probe.abi3.so, 0x0002): bad bind opcode 0x00
cause Incorrectly built wheel for macOS >14.2 in versions <1.0.12.
fix
pip install --upgrade slipcover>=1.0.12
breaking Python 3.8 is required minimum, Python 3.15+ is not supported (requires_python: <3.15,>=3.8).
fix Use Python 3.8 to 3.14.
gotcha SlipCover uses a C extension (`probe.abi3.so`). On macOS >14.2, wheels may cause dlopen errors like 'bad bind opcode 0x00'. Upgrade to >=1.0.12.
fix pip install --upgrade slipcover>=1.0.12
gotcha The `--omit` flag does not work with `--source` prior to v1.0.18. Combining them may omit nothing.
fix Upgrade to >=1.0.18 or use separate `--source` and `--omit` invocations.

Basic usage: start/stop coverage and print summary

from slipcover import SlipCover

sc = SlipCover()
sc.start()
# run code to be measured
sc.stop()
print(sc.report())