An automated test is code that runs other code with known inputs and checks the expected result, with no human intervention. It detects regressions, documents behavior and gives confidence to modify code. Unit tests target small units such as a function.
Example
def test_moyenne():
assert moyenne([2, 4]) == 3