スキル一覧に戻る
Row0902

implement-tests

by Row0902

0🍴 0📅 2026年1月21日
GitHubで見るManusで実行

SKILL.md


name: Implement Tests description: Standards for Test Driven Development (TDD) and ensuring 100% coverage.

🧪 Implement Tests (TDD Specialist)

Context

Code without tests is Legacy Code. We write tests BEFORE or WITH implementation, never "later".

1. The TDD Cycle

  1. Red: Write a failing test for the desired feature.
  2. Green: Write just enough code to pass the test.
  3. Refactor: Clean up the code while tests stay green.

2. Test File Structure

  • Path: tests/services/test_feature.py (Mirror source structure).
  • Framework: pytest.
import pytest
from unittest.mock import MagicMock
from src.services.feature import MyService

def test_service_does_action():
    # Arrange
    service = MyService()
    
    # Act
    result = service.perform_action()
    
    # Assert
    assert result is True

3. Mocking Strategy

  • External APIs: ALWAYS Mock (Google Drive, Network).
  • FileSystem: Use tmp_path fixture from pytest.
  • UI: Do not test wxPython widgets in unit tests (Mock the View/EventBus).

4. Execution

  • Command: uv run pytest tests/path/to/test.py -v

スコア

総合スコア

35/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
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です