PyTest automatically discovers tests following these conventions:
test_*.py
or *_test.py
test_
Test
(no __init__
method)test_
# Valid test file: test_math.py
def test_addition(): # ✓ Discovered
pass
class TestCalculator: # ✓ Discovered
def test_multiply(self): # ✓ Discovered
pass
def helper_method(self): # ✗ Not discovered
pass