How to test if __name__ == ‘__main__’
You need to test those two pesky lines at the end of your app, if you want 100% code coverage. For dynamically typed languages it is the absolute necessity to have 100% code coverage. Runtime type-checking will push all typos in names of functions and variables…