Say I have a module with the following:
def main(): pass if __name__ == \"__main__\": main()
I want to write a unit test for the b
One approach is to run the modules as scripts (e.g. os.system(...)) and compare their stdout and stderr output to expected values.