From 3256bca88e8354fedccdd36e43f38eab8b250042 Mon Sep 17 00:00:00 2001 From: Bobby Noelte Date: Tue, 24 Nov 2026 08:08:19 +0000 Subject: [PATCH] docs(ai): group the tests of one unit in a test class Co-Authored-By: Claude Opus 5.5 Assisted-by: Claude Code (claude-opus-5-5) --- ai/skills/testing/SKILL.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ai/skills/testing/SKILL.md b/ai/skills/testing/SKILL.md index 9b2c706c..9b825764 100644 --- a/ai/skills/testing/SKILL.md +++ b/ai/skills/testing/SKILL.md @@ -11,8 +11,11 @@ description: Use when adding or updating pytest tests, fixing bugs, or changing ## Rules -- **Prefer adding tests to existing test classes in existing test modules.** - Extend the relevant class/module rather than creating new files. +- **Group the tests of one unit in a test class** (`Test`, e.g. + `TestToTimezone` for `to_timezone()`) in the existing test module of that + code: add a test to the unit's class, and create the class when a unit gets + its second test. Extend the relevant class/module rather than creating new + files. - Create a new test module only when: - functionality is a distinct aspect that does not fit any existing module, or - it targets a different component/test target.