Python: Generate Test Case Stubs For All Classes In A Module

I had a module full of classes. I wanted to generate a unittest.TestCase stub for every class, such as this:

# TODO: Finish this
class Test_className(unittest.TestCase):
def setUp(self):
pass

So, I wrote the following Python script:

if __name__=="__main__":
file = "c:/dev/sourceFile.py"
f [...]

July 9, 2009 • Tags: , , • Posted in: Jigs • One Comment