ยินดีด้วย!

Python เบื้องต้นสำหรับการทดสอบโค้ด

Alexander Levin

Data Scientist

บทที่ 1 - สร้างการทดสอบด้วย pytest

  • การทดสอบและ pytest
  • CLI: pytest test_script.py
  • Test markers

ตัวอย่างผลลัพธ์ของการทดสอบ

Python เบื้องต้นสำหรับการทดสอบโค้ด

บทที่ 2 - Pytest fixtures

  • แนะนำ fixtures
  • การเชื่อมต่อคำขอ fixtures fixture เรียก fixture อื่น

  • Fixtures autouse

  • Fixtures teardown
Python เบื้องต้นสำหรับการทดสอบโค้ด

บทที่ 3 - ประเภทการทดสอบเบื้องต้น

  • Unit testing
  • Feature testing
  • Integration testing
  • Performance testing
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

  • Fixtures ใน unittest

  • ตัวอย่างเชิงปฏิบัติ
Python เบื้องต้นสำหรับการทดสอบโค้ด

ยินดีด้วย!

Python เบื้องต้นสำหรับการทดสอบโค้ด

Preparing Video For Download...