This is a simple example introducing both unit testing in Python and the concept of TDD.
Here is the github link to the code of this project.
https://github.com/TheDancerCodes/pyt...
For this tutorial I used the testing tool pytest:
http://docs.pytest.org/en/latest/gett...
Feel free to use whatever testing tool you are comfortable with.
Enjoy.