Pytest discipline for writing, reviewing, and fixing Python tests — what deserves to be a committed test, deterministic concurrency testing, fixture isolation, mocking boundaries, and suite structure.
Pytest discipline for writing, reviewing, and fixing Python tests — what deserves to be a committed test, deterministic concurrency testing, fixture isolation, mocking boundaries, and suite structure.
Triggers on writing or reviewing pytest tests, designing fixtures, parametrizing cases, mocking or patching, debugging flaky or order-dependent tests, xfail/skip decisions, and pytest configuration.
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Claude CodeNot declared
CursorNot declared
CodexNot declared
GitHub CopilotNot declared
WindsurfNot declared
Gemini CLINot declared
ClineNot declared
OpenCodeNot declared
Repository health
Stars2
LicenseMIT
Default branchmain
Open issues0
Status
Active
Skill metadata
Parsed from SKILL.md frontmatter.
Version1.0.0
LicenseMIT
More metadata
author
python-pytest
version
1.0.0
pythonVersion
>=3.11
Package contents
Files included with this skill beyond the listing page.
skill mdSKILL.md4,377 B
docsSUMMARY.md422 B
History
First seen on skills.sh
First recorded snapshot · 9 installs
SKILL.md
Python Pytest
Guidelines for writing and reviewing pytest suites. 15 rules across 5 categories, prioritized by impact.
A rule match is a signal, not a verdict. Most rules are design preferences for new tests — check the rule's impact level before flagging in review or churning a stable suite.
Quick-reference lines are triggers, not licenses: before applying a rule as a review finding or a transformation, open the rule file and check its counter-signal — the marker-opened paragraph (When ... / Scope: / Exception ...) saying when NOT to apply it.
When to Apply
Writing new tests or fixtures
Reviewing test files for value, isolation, or determinism
Debugging flaky, order-dependent, or falsely-green tests
Configuring pytest and its plugin surface
The unit of judgment is the contract a test defends — every rule here traces back to whether a failure would mean something.
Impact Levels
HIGH — the test defends nothing or lies (probes, self-oracles, timing bets, masked flakes). Fix when found.
MEDIUM-HIGH — isolation and mocking failures that surface as order-dependence or tautology.
MEDIUM — structure and granularity; apply to new tests.
LOW-MEDIUM — suite-level hygiene; apply when configuring or composing suites.
Rule Categories by Priority
Priority
Category
Impact
Prefix
1
Test Value
HIGH
value-
2
Determinism
HIGH
determinism-
3
Fixtures & Isolation
MEDIUM-HIGH
fixtures-
4
Mocking
MEDIUM-HIGH
mock-
5
Structure & Execution
MEDIUM
structure-
Quick Reference
Test Value (value-)
value-observable-contracts — A committed test protects a named behavior; delete execution probes
value-independent-oracles — Expected values derived independently, never by re-running the implementation's formula