Python เบื้องต้นสำหรับการทดสอบโค้ด
Alexander Levin
Data Scientist
pytestpytest test_script.py
การเชื่อมต่อคำขอ fixtures

Fixtures autouse
import unittest
class TestSquared(unittest.TestCase):
def test_negative(self):
self.assertEqual((-3) ** 2, 9)
Unittest CLI

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