Skip to content

Commit 5b3354b

Browse files
docs: clean up AI writing patterns in coverage doc
1 parent 2a383b0 commit 5b3354b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/coverage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pip install coverage
1010
pip install tusk-drift[coverage]
1111
```
1212

13-
If `coverage` is not installed and `--coverage` is used, the SDK logs a warning and coverage is skipped — tests still run normally.
13+
If `coverage` is not installed when coverage is enabled, the SDK logs a warning and coverage is skipped. Tests still run normally.
1414

1515
## How It Works
1616

@@ -24,7 +24,7 @@ import coverage
2424
cov = coverage.Coverage(
2525
source=[os.path.realpath(os.getcwd())],
2626
branch=True,
27-
omit=["*/site-packages/*", "*/venv/*", "*/.venv/*", "*/test*", "*/__pycache__/*"],
27+
omit=["*/site-packages/*", "*/venv/*", "*/.venv/*", "*/tests/*", "*/test_*.py", "*/__pycache__/*"],
2828
)
2929
cov.start()
3030
```
@@ -93,7 +93,7 @@ This is important because the protobuf communicator runs coverage handlers in a
9393
## Limitations
9494

9595
- **`coverage` package required**: Unlike Node.js (V8 coverage is built-in), Python needs `pip install coverage`. If not installed, coverage silently doesn't work (warning logged).
96-
- **Performance overhead**: coverage.py uses `sys.settrace()` which adds 10-30% execution overhead. V8 coverage is near-zero. This overhead only applies during `--coverage` replay runs.
96+
- **Performance overhead**: coverage.py uses `sys.settrace()` which adds 10-30% execution overhead. This only applies during coverage replay runs.
9797
- **Multi-process servers**: gunicorn with `--workers > 1` forks worker processes. The SDK starts coverage.py in the main process; forked workers don't inherit it. Use `--workers 1` during coverage runs.
9898
- **Private API for branches**: `_analyze()` is not part of coverage.py's public API. Branch coverage detail may break on future coverage.py versions.
9999
- **Python 3.12+ recommended for async**: coverage.py's `sys.settrace` can miss some async lines on Python < 3.12. Python 3.12+ uses `sys.monitoring` for better async tracking.

0 commit comments

Comments
 (0)