In brief
unittest organizes test cases, setup and assertions. assertEqual() compares an actual result with an expected value and exposes a mismatch.
Useful to know
unittest organizes test cases, setup and assertions. assertEqual() compares an actual result with an expected value and exposes a mismatch. [1]
A test that calls a function without checking anything can miss an incorrect result. For a calculation, choose a small example with an independently known answer and a meaningful boundary case. Clear setup makes the defect caught by failure understandable.
Sources
For further detail and to check the information: