unittest -- simple question

Brian balex at sympatico.ca
Sun Nov 2 05:30:20 CET 2003


I am writing my test modules that are separate from the modules they
test. The test modules can be invoked with if __name__ == "__main__" when
run from a command line. Right now, if __name__ == "__main__", the test
module executes runTests(), which defines a suite of tests. From the
module being tested, I am calling into the test module -- to the function
runTests(), if __name__ == "__main__".

Is this how people make the tests executable from the module be tested?

Many thanks,


More information about the Python-list mailing list