[CentralOH] Unit Testing with PyDev

Mark Erbaugh mark at microenh.com
Sat May 10 14:13:49 CEST 2008


I'm using Eclipse with PyDev for Python development.  I've written
several unit test scipts. I can run each one using Eclipse/Pydev's  Run
as Python unit-test command.

Is there a way to automatically run them all at once?  I created a
simple script that sort of works:

from Test1 import *
from Test2 import *

However, the problem is that I wasn't very creative in naming my test
cases so Test1 and Test2 may have test cases with the same name, which
would mean that some test cases may be skipped.

I've noticed that Run As Python unit-test ignores the code I've placed
in the if __name__ == '__main__' suite. Apparently, it just looks for
Test... objects.


More information about the CentralOH mailing list