おめでとうございます!

Pythonによるテスト入門

Alexander Levin

Data Scientist

第1章 - pytest でテスト作成

  • テストと pytest
  • CLI: pytest test_script.py
  • テストマーカー

テスト出力の例

Pythonによるテスト入門

第2章 - Pytest フィクスチャ

  • フィクスチャの概要
  • フィクスチャの連鎖リクエスト 別のフィクスチャを呼び出すフィクスチャ

  • 自動適用(autouse)フィクスチャ

  • フィクスチャのティアダウン
Pythonによるテスト入門

第3章 - 基本的なテスト種類

  • ユニットテスト
  • 機能テスト
  • 統合テスト
  • パフォーマンステスト
Pythonによるテスト入門

第4章 - unittest でテストを書く

  • unittest を使う
    import unittest
    class TestSquared(unittest.TestCase):
      def test_negative(self):
          self.assertEqual((-3) ** 2, 9)
    
  • unittest の CLI unittest test_sqneg.py の出力

  • unittest におけるフィクスチャ

  • 実用例
Pythonによるテスト入門

おめでとうございます!

Pythonによるテスト入門

Preparing Video For Download...