723 B
723 B
| paths | ||
|---|---|---|
|
Python テスト
このファイルは common/testing.md を Python 固有のコンテンツで拡張します。
フレームワーク
テストフレームワークとして pytest を使用する。
カバレッジ
pytest --cov=src --cov-report=term-missing
テストの構成
テスト分類には pytest.mark を使用する:
import pytest
@pytest.mark.unit
def test_calculate_total():
...
@pytest.mark.integration
def test_database_connection():
...
リファレンス
スキル: python-testing で詳細な pytest パターンとフィクスチャを参照してください。