Skip to content

Add agent skill for writing tests with full coverage#1508

Merged
nathanjmcdougall merged 2 commits intomainfrom
copilot/add-agent-skill-for-writing-tests
Mar 25, 2026
Merged

Add agent skill for writing tests with full coverage#1508
nathanjmcdougall merged 2 commits intomainfrom
copilot/add-agent-skill-for-writing-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

New agent skill at .agents/skills/usethis-test-with-coverage/ to guide agents through achieving ≥95% code coverage on their changes, matching the project's Codecov thresholds.

Covers:

  • Scoped coverage measurement with pytest-cov (--cov=usethis.module --cov-report=term-missing)
  • HTML report generation for inspecting complex coverage gaps
  • Project coverage targets and automatic exclusion patterns
  • Iterative workflow: run → inspect missing lines → write targeted tests → repeat
  • Pre-push verification with --cov-fail-under=95

Example usage from the skill:

uv run pytest tests/path/to/test_module.py --cov=usethis.module_name --cov-report=term-missing -x -v
Original prompt

This section details on the original issue you should resolve

<issue_title>Agent skill for writing tests with full coverage</issue_title>
<issue_description>Should include information on how to hook into coverage tools, running specific tests for relevant modules and proving there is full coverage (or >95%)

Good as a way to pass codecov checks, e.g. see #1451</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/12e0c510-bb46-4c64-8773-64f04645f4c7
Copilot AI changed the title [WIP] Add agent skill for writing tests with full coverage Add agent skill for writing tests with full coverage Mar 25, 2026
Copilot AI requested a review from nathanjmcdougall March 25, 2026 01:41
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 25, 2026 02:01
@nathanjmcdougall nathanjmcdougall merged commit 428609f into main Mar 25, 2026
@nathanjmcdougall nathanjmcdougall deleted the copilot/add-agent-skill-for-writing-tests branch March 25, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent skill for writing tests with full coverage

2 participants