Have something like unittest, or pytest which can run unitests and and also end to end test to validate the functioning of the application.