python-testing
pytest、TDD手法、フィクスチャ、モック、パラメータ化、カバレッジ要件を使用したPythonテスト戦略。
Skill by marshall0524
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/marshall0524-python-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/python-testing
What's inside
- Skill name
python-testing- Description
- pytest、TDD手法、フィクスチャ、モック、パラメータ化、カバレッジ要件を使用したPythonテスト戦略。
- License
- MIT
- Instructions
- 812 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 812 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Pythonテストパターン
pytest、TDD方法論、ベストプラクティスを使用したPythonアプリケーションの包括的なテスト戦略。
## いつ有効化するか
- 新しいPythonコードを書くとき(TDDに従う:赤、緑、リファクタリング)
- Pythonプロジェクトのテストスイートを設計するとき
- Pythonテストカバレッジをレビューするとき
- テストインフラストラクチャをセットアップするとき
## 核となるテスト哲学
### テスト駆動開発(TDD)
常にTDDサイクルに従います。
1. **赤**: 期待される動作のための失敗するテストを書く
2. **緑**: テストを通過させるための最小限のコードを書く
3. **リファクタリング**: テストを通過させたままコードを改善する
```python
# Step 1: Write failing test (RED)
def test_add_numbers():
result = add(2, 3)
assert result == 5
# Step 2: Write minimal implementation (GREEN)
def add(a, b):
return a + b
# Step 3: Refactor if needed (REFACTOR)
```
### カバレッジ要件
- **目標**: 80%以上のコードカバレッジ
- **クリティカルパス**: 100%のカバレッジが必要
- `pytest --cov`を使用してカバレッジを測定
```bash
pytest --cov=mypackage --cov-report=term-missing --cov-report=html
```
## pytestの基礎
### 基本的なテスト構造
```python
import pytest
def test_addition():
"""Test basic addition."""
assert 2 + 2 == 4
def test_string_uppercase():
"""Test string uppercasing."""
text = "hello"
assert text.upper() == "HELLO"
def test_list_append():
"""Test list append."""
items = [1, 2, 3]
items.append(4)
assert 4 in items
assert len(items) == 4
```
### アサーション
```python
# Equality
assert result == expected
# Inequality
assert result != unexpected
# Truthiness
assert result # Truthy
assert not result # Falsy
assert result is True # Exactly True
assert result is False # Exactly False
assert result is None # Exactly None
# Membership
assert item in collection
assert item not in collection
# Comparisons
assert result > 0
assert 0 <= result <= 100
# Type checking
assert isinstance(result, str)
# Exception testing (preferred approach)
with pytest.raises(ValueError):
raise ValueError("error message")
# Check exception message
with pytest.raises(ValueError, match="invalid input"):
raise ValueError("invalid input provided")
# Check exception attributes
with pytest.raises(ValueError) as exc_info:
raise ValueError("error message")
assert str(exc_info.value) == "error message"
```
## フィクスチャ
### 基本的なフィクスチャ使用
```python
import pytest
@pytest.fixture
def sample_data():
"""Fixture providing sample data."""From marshall0524/everythingclaudecode, MIT.
More from marshall0524/everythingclaudecode
- 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
nutrient-document-processing
marshall0524
Nutrient DWS API を使用してドキュメントの処理、変換、OCR、抽出、編集、署名、フォーム入力を行います。PDF、DOCX、XLSX、PPTX、HTML、画像に対応しています。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
security-review
marshall0524
認証の追加、ユーザー入力の処理、シークレットの操作、APIエンドポイントの作成、支払い/機密機能の実装時にこのスキルを使用します。包括的なセキュリティチェックリストとパターンを提供します。
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
iterative-retrieval
marshall0524
サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
eval-harness
marshall0524
Claude Codeセッションの正式な評価フレームワークで、評価駆動開発(EDD)の原則を実装します
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
python-patterns
marshall0524
Pythonic イディオム、PEP 8標準、型ヒント、堅牢で効率的かつ保守可能なPythonアプリケーションを構築するためのベストプラクティス。
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
coding-standards
marshall0524
TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。
SkillDFreshness: D★ 41Claude Code +9
Signals
- Stars
- 41
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Feb 20, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from marshall0524
- 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9
Cite this page
python-testing skill. Agent Mart. https://agentmart.dev/skills/marshall0524-python-testing (last updated 2026-10-24)