Test the edge cases a green test suite missed
One green test covers one small order. Add the boundary cases and error paths.
Tested with Codex CLI 0.163.0.
Install this skill with AgentBay
Read pytest-coverage SKILL.md ↗ · Pinned publisher instructions
- Get the finder once. Install AgentBay for your app, then open a fresh chat.
- Install this one skill. Use the button below. The prompt includes this publisher’s exact source and revision. Ask AgentBay to check the instructions, license and prerequisites before installing.
- Confirm it is active. Start a fresh agent session if needed. Check that the selected skill appears in Skills, then ask your agent to read its SKILL.md and required resources. In Claude desktop, upload and enable its complete ZIP; a filesystem copy does not activate it.
To follow along, download the starter project, unzip it and open that folder in your agent. Complete the local setup below, then give your agent this task.
Want a few skills? Add them to your selection, review the exact list, and copy instructions for only those choices. Paste the commands into your terminal, then confirm the skills appear in your agent.
What you’re starting with
Check the free-shipping threshold, both regions and invalid values. The calculator already handles them; the starting test suite exercises only one small domestic order.
Here’s what to do
Ask your agent to inspect coverage before writing more tests. Keep shipping.py untouched and fill the gaps in test_shipping.py. The recorded Codex run added boundary and error cases, then we independently verified results and the unchanged production-source hash.
Check the result
Thirteen tests now exercise all eight source lines and all six branches. The exact threshold, both regions and both invalid-input errors are checked. A repeat Codex run and independent verification also pass with the audited pytest 9.0.3 pin.
Test the exact boundary and the values on either side. Keep production code unchanged while strengthening its tests.
Start with the instructions
Read the actual pytest-coverage SKILL.md ↗
github/awesome-copilot · pinned 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd
Reviewed October 31, 2026.
- Good for
- Finding uncovered Python lines with pytest-cov
- Adding boundary and error-path tests to an existing module
- Needs
- Python 3.12 with pytest 9.0.3 and pytest-cov 7.0.0 for this fixture
- A working module and permission to add tests
- Scope
- One pure Python function, including both regions and invalid inputs
- Line and branch coverage measured with pytest-cov
The input and actual output
Download the synthetic project and unchanged checks (ZIP). It contains no installed third-party skills. Install the pinned upstream skill separately after reviewing its license.
1 test → 13 passing tests
Lines 8/8 · branches 6/6
Production source unchangedInspect the actual solution: coverage.json · test_shipping.py.
Does exactly 50 count as free shipping?
Boundary bugs often hide between “below” and “at least.” Give the exact boundary its own check.
- Try this
Domestic subtotal: 49.99, 50.00, 50.01- Checked result
Shipping: 5, 0, 0
The actual parametrized tests cover the threshold on both sides. The independent verifier also checks the exact boundary; all source and branch coverage comes from unchanged production code.
Inspect the shared test receipt →Checks performed
- Exactly 50 qualifies for free domestic shipping; values below it do not
- Both regions, zero subtotal and invalid inputs independently checked
- Thirteen pytest cases pass with 8/8 source lines and 6/6 branches covered
- shipping.py is byte-for-byte unchanged from the starter
Test receipt, installed-file hashes and source binding (JSON)
App test results
| Runtime | Result |
|---|---|
| Codex CLI 0.163.0 | passed |
| Codex desktop | not tested — manual desktop check pending |
| Claude Code | not tested — no authenticated run recorded |
| Claude desktop | not tested — manual desktop check pending |
Repeat it in a clean project
Unzip the input into a new directory. Follow the setup below; JavaScript examples use Node 24 and Python examples specify their packages. Install only the selected source skill at the pinned revision above. Open a fresh agent session and confirm its skill list contains the installed skill; ask it to read SKILL.md before changing the input.
python3 -m venv .venv.venv/bin/pip install -r requirements.txtAsk your agent to inspect coverage and change test_shipping.py only.venv/bin/python verify.py
Run the checks, then compare your output with the recorded result.