Test Overview
This test group checks basic math operations: addition and subtraction. It verifies that the functions return correct results.
This test group checks basic math operations: addition and subtraction. It verifies that the functions return correct results.
import pytest class TestMathOperations: def test_addition(self): assert 2 + 3 == 5 def test_subtraction(self): assert 5 - 3 == 2
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | PyTest starts and discovers tests in TestMathOperations class | Test runner ready to execute test_addition and test_subtraction | - | PASS |
| 2 | Runs test_addition method | Executing assertion 2 + 3 == 5 | Check if 2 + 3 equals 5 | PASS |
| 3 | Runs test_subtraction method | Executing assertion 5 - 3 == 2 | Check if 5 - 3 equals 2 | PASS |
| 4 | PyTest finishes running all tests in TestMathOperations | All tests passed | - | PASS |