Skip to content
Skills Library
Programming · Testing

dev10x:py-test

/dev10x:py-test

Run pytest with coverage enforcement. Verifies test suite passes with 100% coverage for new code. Reports pass/fail status and coverage percentage with full output only on failures. TRIGGER when: code changes need test verification before committing, explicitly asked to run tests, or creating a pull request. DO NOT TRIGGER when: no Python code changed, or running non-pytest test frameworks.

Licence
MIT
Last repository change
12.10.2026

Assessment and security

90/ 100Class: good
Format15 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Run pytest with coverage enforcement. Verifies test suite passes with 100% coverage for new code. Reports pass/fail status and coverage percentage with full output only on failures. TRIGGER when: code changes need test verification before committing, explicitly asked to run tests, or creating a pull request. DO NOT TRIGGER when: no Python code changed, or running non-pytest test frameworks.

Original author description

Run pytest with coverage enforcement. Verifies test suite passes with 100% coverage for new code. Reports pass/fail status and coverage percentage with full output only on failures. TRIGGER when: code changes need test verification before committing, explicitly asked to run tests, or creating a pull request. DO NOT TRIGGER when: no Python code changed, or running non-pytest test frameworks.

How it works

  1. Overview
  2. When to Use
  3. Workflow
  4. Coverage Enforcement
  5. Important Notes
Original SKILL.md headings · 120 lines, 596 words
SKILL.md preview
---
name: dev10x:py-test
description: >
  Run pytest with coverage enforcement. Verifies test suite passes
  with 100% coverage for new code. Reports pass/fail status and
  coverage percentage with full output only on failures.
  TRIGGER when: code changes need test verification before committing,
  explicitly asked to run tests, or creating a pull request.
  DO NOT TRIGGER when: no Python code changed, or running non-pytest
  test frameworks.
user-invocable: true
invocation-name: dev10x:py-test
allowed-tools:
  - mcp__plugin_dev10x_cli__run_tests
  - Bash(pytest:*)
  - Bash(uv:*)
---

# Python Test Verifier

## Overview

Run the test suite and verify all tests pass with 100% coverage
for new code. Reports concise summaries — detailed output only on
failures.

## When to Use

- Code changes need test verification before committing
- Before creating a pull request
- Explicitly asked to run tests or check coverage
- After implementing fixes to verify they work

## Workflow

### Step 1: Run Tests

**Preferred — MCP tool** (works in every session, including
worktrees where `pytest` is not on PATH and the Bash hook blocks
every direct invocation form, GH-238):

```
mcp__plugin_dev10x_cli__run_tests()
```

Pass extra pytest args via the `args` parameter, e.g.
`args=["src/dev10x/runner/"]` or `args=["-k", "name"]`. The tool
returns a structured payload: `returncode`, `summary`, `passed`,
`failed`, `skipped`, `coverage_percent`, `failed_tests`,
`missing_coverage`, `extras`, `retried_with_extras`, `stdout`,
`stderr`. The subprocess is launched from the MCP server so the
PreToolUse hook does not apply.

**The tool resolves the project's dependency extra itself
(GH-1198).** It reads `[project.optional-dependencies]` from
`pyproject.toml` and adds the group that declares pytest, so a suite
whose test dependencies live under a `dev` extra runs green without
anyone typing `--extra dev`. `extras` reports what it applied. When
resolution finds nothing and the run dies at collection on a
`ModuleNotFoundError`, it retries once with `--extra dev` and sets
`retried_with_extras` — read that as a signal the project's extras
are named unusually, not as a normal outcome.

Before this, the sanctioned wrapper could not run such a suite at
all, so the agent fell back to the raw command the routing table
forbids — and kept using it for every iteration of the fix-test
loop. **If you find yourself reaching for a raw `pytest` because
the wrapper failed on a missing import — or timed out — that is a
bug in the wrapper: file it rather than working around it.**

**The default timeout is the transport ceiling (GH-1331).**
`run_tests()` defaults `timeout` to `MAX_TOOL_CALL_SECONDS` (1080s)
— the largest value the MCP transport is clamped to anyway
(GH-1288) — so omitting the parameter already asks for the most
the wrapper can serve. A run that still times out at that ceiling
means the full suite genuinely needs longer than one tool call can
give it: narrow with `args=["-k", "name"]` / a path, or split the
suite across calls. On timeout the payload carries `verdict`,
`elapsed`, `timeout_clamped`, and whatever `stdout`/`stderr` pytest
produced before the cut-off, so a slow-but-green run is
distinguishable from a hang.

**Fallback — Bash** (only when the MCP server is unavailable):

```bash
pytest --cov --cov-report=term-missing
```

Inside a worktree (`.git` is a file, not a directory), prefix
with `uv run`, and add the extra that carries the test
dependencies if the project declares one:

```bash
uv run --extra dev pytest --cov --cov-report=term-missing
```

### Step 2: Parse Results

Extract:
- Total tests run
- Tests passed/failed
- Coverage percentage
- Uncovered lines (if any)

### Step 3: Report Summary

**If all tests pass:**
```
Tests: 150 passed
Coverage: 100%
```

**If tests fail:**
```
Tests: 148 passed, 2 failed

Failed tests:
1. test_calculate_total - AssertionError: expected 100, got 99
2. test_validate_input - ValueError: invalid input

Coverage: 98% (missing: src/service.py:45-48)
```

## Coverage Enforcement

If coverage is below 100% for files changed in the current branch,
the branch introduced the regression. Report the failure and fix
the gap — do not ask the user whether to proceed with coverage
below 100%.

## Important Notes

- Always run tests before committing
- Ensure 100% coverage for new code
- Fix failing tests before creating PR
- Use `-v` flag for verbose output when debugging

Versions

The database has no other skills named dev10x:py-test.

Database snapshot: 13.11.2026 · package version 487ffed5bfb5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100python-testing
    Python testing with pytest, coverage, fixtures, and mocking. Use when the user mentions pytest, unit tests, coverage, fixtures, mocking, or writing Python tests.
  • 100python-testing
    Write and run Python tests using pytest with fixtures, mocking, coverage, and the AAA pattern. Use when writing Python tests, creating test files, or setting up pytest configuration.
  • 100pytest-test-generator
    Generate pytest test generator operations. Auto-activating skill for Test Automation. Triggers on: pytest test generator, pytest test generator Part of the Test Automation skill category. Use when writing or running tests. Trigger with phrases like "pytest test generator",…
  • 100python-testing
    Designs, writes, and evaluates Python tests with pytest, coverage, contract tests, property tests, and optional adapter integration. Use for behavior changes, test infrastructure, flaky tests, coverage policy, or test quality assessment. Requires python-standards and…
  • 100pytest-runner
    Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.
  • 100python-pytest-ops
    pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.