Test Overview
This test class groups two simple tests that check basic math operations. It verifies that addition and multiplication work as expected.
This test class groups two simple tests that check basic math operations. It verifies that addition and multiplication work as expected.
import pytest class TestMathOperations: def test_addition(self): result = 2 + 3 assert result == 5 def test_multiplication(self): result = 4 * 5 assert result == 20
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Pytest starts and discovers the test class TestMathOperations | Test runner is ready to execute tests | - | PASS |
| 2 | Pytest runs test_addition method | Inside test_addition, result is calculated as 2 + 3 | Assert that result == 5 | PASS |
| 3 | Pytest runs test_multiplication method | Inside test_multiplication, result is calculated as 4 * 5 | Assert that result == 20 | PASS |
| 4 | Pytest finishes running all tests in TestMathOperations | All tests passed | - | PASS |