CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/python-unit-tests

Python unit testing with pytest as the primary framework - fixtures (`@pytest.fixture` scopes, `conftest.py`), `@pytest.mark.parametrize` table-driven tests, markers (`skip` / `xfail` / custom with `--strict-markers`), `pyproject.toml` config, mocking via pytest-mock, coverage gating with pytest-cov (`--cov-fail-under`), parallel runs with pytest-xdist, and CI wiring - plus stdlib `unittest` (TestCase, unittest.mock, discovery) and `doctest` (docstring examples, directives) as references. Includes framework choice (pytest for new code; match an existing unittest convention; doctest only for documented examples) and test-authoring conventions (framework detection from pyproject.toml/setup.cfg/tox.ini, layout matching, no fabricated attributes). Use for any Python unit-test task: setting up pytest, writing fixtures or parametrized tests, mocking, gating coverage, wiring CI, or maintaining unittest/doctest suites. For async tests, see pytest-asyncio-patterns.

72

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A tight, executable pytest walkthrough with well-split references and built-in config-level validation checkpoints. Minor conciseness trims and an explicit validate-retry loop for coverage/CI steps would round it out.

Suggestions

Add a short validate-fix-retry loop for the coverage and CI steps (e.g. 'if --cov-fail-under fails, inspect term-missing output, add tests, re-run') to raise workflow clarity toward the top anchor.

Tighten a few explanatory asides (e.g. 'the modern default; migration from unittest is mostly mechanical...') to lift conciseness closer to fully lean.

DimensionReasoningScore

Conciseness

The body is lean and code-forward with almost no padding of concepts Claude already knows, but a few narrative bridges ('the modern default', short explanatory asides) keep it just shy of the maximally efficient anchor.

4 / 5

Actionability

Every section gives copy-paste-ready, executable code or commands (install, config, fixtures, parametrize, markers, mocking, coverage, CI, fast-feedback flags) covering the common cases concretely.

5 / 5

Workflow Clarity

A clear 10-step sequence is reinforced by built-in checkpoints (--strict-markers rejecting typos, --cov-fail-under gating coverage) and a 'stop and ask' conflict rule, though there is no explicit validate-fix-retry loop for the destructive/batch-adjacent steps.

4 / 5

Progressive Disclosure

The SKILL.md is an overview that cleanly offloads unittest and doctest detail to one-level-deep, clearly signaled reference files (both present in ./references/), with sibling skills named, giving easy navigation.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A dense, third-person description that pairs a comprehensive capability inventory with explicit use-trigger guidance and clear sibling-skill boundaries. Its only weakness is trigger phrasing that leans technical and comma-heavy rather than mirroring casual user speech.

Suggestions

Soften the 'Use for' clause into a few shorter, conversational trigger phrases (e.g. 'Use when the user asks to write or run Python unit tests, add fixtures, mock dependencies, or gate coverage') to better match natural speech.

Trim some of the deep parenthetical detail (e.g. the full list of @pytest.fixture scopes) from the description and keep it in the body, since the description is currently near the upper limit of useful density.

DimensionReasoningScore

Specificity

Lists multiple concrete actions across the full pytest lifecycle (fixtures, @pytest.mark.parametrize, markers, pyproject.toml config, pytest-mock, --cov-fail-under, pytest-xdist, CI wiring) plus stdlib unittest/doctest, matching the comprehensive-coverage anchor.

5 / 5

Completeness

An explicit 'Use for any Python unit-test task:' clause gives concrete triggers while the opening inventory clearly states what the skill does, satisfying both what and when with concrete trigger phrases.

5 / 5

Trigger Term Quality

Natural user phrases appear ('setting up pytest, writing fixtures or parametrized tests, mocking, gating coverage, wiring CI') with synonyms, but the long comma-dense jargon run leaves a few common variations unrepresented, sitting just below the comprehensive anchor.

4 / 5

Distinctiveness Conflict Risk

The Python unit-test niche is sharply scoped and async work is explicitly diverted to the pytest-asyncio-patterns sibling skill, leaving minimal overlap risk.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

Table of Contents