Is there a consensus about the best place to put Python unittests?
Should the unittests be included within the same module as the functionality being tested (executed wh
There might be reasons other than testing to use the if __name__ == '__main__'
check. Keeping the tests in other modules leaves that option open to you. Also - if you refactor the implementation of a module and your tests are in another module that was not edited - you KNOW the tests have not been changed when you run them against the refactored code.