agentleFS
TheBeardedBearSASTheBeardedBearSAS/claude-craft/.claude/skills/testing-python/SKILL.md

testing-python

Skill106 starsChanged 4 months agoMITView on GitHub

Stratégie de Tests Python 3.14+. Use when writing tests, reviewing test coverage, or setting up testing.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Stratégie de Tests Python 3.14+

Versions : Python 3.14+ | pytest 8.x | Ruff 0.8+ | mypy 1.13+ | Playwright

Ruff remplace Black + isort + Flake8 (10-100x plus rapide). mypy strict élimine les bugs de type à la compilation.

Stack recommandée 2026

TypeOutilUsage
Unit/Integrationpytest 8.xTests backend FastAPI/Django
Linting + FormatRuff 0.8+10-100× plus rapide que Black+Flake8
Type checkingmypy 1.13+ strictVérification statique
E2E/BrowserPlaywrightTests frontend web
MutationMutmutQualité des tests (score >= 80%)
Property-basedHypothesisGénération de cas de test automatique

Sources : pytest, Ruff, Mutmut

Invariants non-négociables

  • Couverture >= 80% (--cov-fail-under=80 dans pyproject.toml)
  • mypy strict — zéro Any non justifié, disallow_untyped_defs = true
  • Ruff obligatoire (check + format) dans CI
  • Pattern AAA (Arrange-Act-Assert) dans chaque test
  • Fixtures pytest pour l'injection de dépendances (pas d'état global)
  • Mutation score >= 80% via Mutmut

Checklist par type

TypeVérification
UnitIsolation totale, fixtures pytest, mocks unittest.mock
IntegrationTestClient FastAPI / Client Django, DB de test
E2EPlaywright sync_api, expect() assertions
PropertyHypothesis @given pour edge cases automatiques
Mutationmutmut run, score >= 80 avant merge

Détails complets, exemples de code, configs et checklists : voir REFERENCE.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.