pytest

Domain: Testing Quality

🎯 Motivation

pytest is the most popular Python testing framework, known for its simple assert statements and powerful fixtures. It lets students write clear tests with minimal boilerplate, making it the best starting point for learning automated testing.

📋 Concrete Example

You write a function test_add() containing assert add(2, 3) == 5, then run pytest in the terminal to see a green checkmark or a clear failure report.

🔗 Analogy

pytest is like an automatic grading machine for your homework. You write the expected answers, and it instantly tells you which questions pass or fail.