← スキル一覧に戻る

software-testing
by cardoso-neto
⭐ 0🍴 0📅 2026年1月23日
SKILL.md
name: software-testing description: Always use this skill when writing or editing software tests!
software-testing
- When writing tests, avoid mocking too much otherwise your tests will be unmaintainable.
- Always prefer one or two simple integration tests over a bunch of fully mocked unit tests.
- Use real models and data structures whenever possible.
- Print local variables to stdout on tests.
- Except when they're going to be tested against a particular expected value.
- e.g.:
print(f"{header_count=}")\nassert header_count == 1
- e.g.:
- Focus on inputs and outputs to make it easier to debug it when tests fail.
- Except when they're going to be tested against a particular expected value.
- Prefer running tests individually rather than the entire suite when facing errors.
- Validate using models (e.g.: pydantic) instead of countless field-by-field assertions.
data = MyDataModel(**obj)validates structure and types.- then assert
data == expected_data.
- When testing file operations (reading/writing), use
tmp_pathfixture.- Files are automatically cleaned up after the test.
- When reading Excel/CSV files for comparison with Pydantic models:
- Use
pd.read_excel(..., dtype=str, keep_default_na=False)to avoid type coercion issues. - Pandas converts numeric strings to int/float and empty cells to NaN, breaking Pydantic validation.
- Use
- Do not bend prod code over backwards to make tests easier to write.
- Unless that refactoring is beneficial for the prod code itself.
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です