ภาพรวม
Framework ทดสอบ Python ที่ใช้ assertion และ fixture
ความเป็นมา
pytest จัด test discovery, parametrization และ resource lifecycle ผ่าน fixture/plugin
เหมาะกับงานแบบไหน
unit และ integration test ที่ต้องจัดชุดข้อมูลและ resource ซ้ำอย่างเป็นระบบ
ข้อควรชั่งน้ำหนัก
fixture scope และ plugin อาจทำให้ state รั่ว ต้องแยก dependency จริงกับ mock และไม่ใช้ข้อมูล production ใน test ที่เขียนข้อมูล
