This tests specific methods and logic in the code. This is the most granular type of test. The goal is to verify the internal flow of the method, as well as to make sure edge cases are being handled.
For Python, use the unittest library. Also learn from the book “The Hitchhiker’s Guide To Python”