I am writing a small command line tool in python, which has two subcommands (like: git init or git clone). Those subcommands use a few helper functions, which are not exposed on the command line. When writing tests with py.test, does it make sense to test every helper function separately or only test the two functions for the subcommands (they call all the helpers multiple times).
Testing helper functions makes a lot of sense - in this context, these helper functions are the basic building blocks (read: units) for your application. Having tests that prove that they function properly will allow you to easily change their implementation without worrying about whether you're breaking something else or not. The other direction is also true - suppose you did break one of the helper functions. You'd want a simple test to show you the mistake you made, without having to dig through the complicated implementation of the "public" functions to understand why their tests have been broken.
Should I test helper functions or only the main function?