|
From: Kaleb P. <kal...@gm...> - 2007-10-18 05:21:41
|
Hey all, I'm glad to see you're planning on unit testing! :) A couple of recommendations: - Everything should probably be in packages - Having a driver that can run the different test suites that will be present is probably a good idea. - (personal preference) Please don't use spaces in file or directory names A while ago, I created a test driver that I used for all my testing. It basically would go through the different directories (packages) and pull out all the test files, create test suites out of them and then run them. I haven't used it in quite a while, but it should be stable and might be useful. It was nice because I never had to remember to register a testcase; if named correctly, it would automatically be picked up. I have attached the code. It could probably be better designed, but it should at least serve as a good starting point. Right off the bat I can tell you that I would change match_suffix to match_re and use a regular expression to match the files that should be picked up as unit test suites. --Kaleb -------------- next part -------------- A non-text attachment was scrubbed... Name: testrunner.py Type: application/x-python Size: 3784 bytes Desc: not available |