Test Overview
This test module contains two simple test functions to verify basic arithmetic operations. It checks if addition and multiplication work as expected.
This test module contains two simple test functions to verify basic arithmetic operations. It checks if addition and multiplication work as expected.
import pytest def test_addition(): result = 2 + 3 assert result == 5 def test_multiplication(): result = 4 * 5 assert result == 20
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Pytest starts test discovery and finds test_addition function | Test module loaded with two test functions | - | PASS |
| 2 | test_addition function runs: calculates 2 + 3 | Calculation result stored in variable | Assert that result == 5 | PASS |
| 3 | test_addition completes successfully | Test passed | - | PASS |
| 4 | Pytest runs test_multiplication function: calculates 4 * 5 | Calculation result stored in variable | Assert that result == 20 | PASS |
| 5 | test_multiplication completes successfully | Test passed | - | PASS |
| 6 | Pytest finishes running all tests in the module | All tests passed | - | PASS |