MacHu-GWU/sqlalchemy_upsert_kit-project / .claude/skills/pywf-oss-base
pywf-oss-base
FlaggedShared conventions, references, and scripts of the pywf-oss skills for pywf open-source Python libraries: setup, layout, code style, tests, user docs and the agent skills that hold API and maintenance knowledge, CI and hosting, release, dependencies, and secrets. Load it before ad-hoc work on modules, tests, or docs in such a repo, for a question about these conventions, or when unsure which pywf-oss skill fits a job.
references/12-coverage.md
View on GitHub---
description: "What pytest-cov measures, the .coveragerc omit and exclude lists, the 100% per-module target, and when # pragma: no cover is allowed. Read when coverage is below 100%, when deciding whether code may be excluded, or when editing .coveragerc."
---
# Coverage
---
## 1. What is measured
- pytest-cov measures the package (`--cov=<package_name>`). A test file run directly measures only its module (`10-test-layout.md`).
- **`.coveragerc` `[run] omit`** leaves out the files listed in `08-package-files.md` section 8.
- **`.coveragerc` `[report] exclude_lines`** leaves out the usual lines: `pragma: no cover`, `if __name__ == .__main__.:`, `raise NotImplementedError`, `def __repr__`, and so on.
---
## 2. Target
Each module reaches 100% from its own test file. Every uncovered line gets a test, or a justified `# pragma: no cover`.
---
## 3. `# pragma: no cover`
**Allowed** on a line or block that cannot or should not run in unit tests:
- platform-specific branches,
- `if T.TYPE_CHECKING:`,
- defensive code for impossible states,
- code that only runs against real external services.
**Never** use it to hide logic that simply has no test yet.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |