Please anyone help, is this kind of dynamin thing possible? any suggestion for creating frameworks for automated testing ,
all comments appreciated thanks Sakcee wrote: > Hi > > I am trying to use pyUnit to create a framework for testing functions > > I am reading function name, expected output, from a text file. > and in python generating dynamic test functions > something like this > > > class getUsStatesTest( unittest.TestCase ): > > self.setUp = lambda : function_call > self.testReturnVal = lambda : self.assertEqual( fileInput, > function_returnedVals ) > self.testLength = lambda : self.assertEqual( len(returnedVals) > , len(inp) ) > > > > is it possible to load these dynamic functions via pyUnit, instead of > defining in text form , > can i use loadfromname etc to load these dynamic test functions. > > something like this > > unittest.TestSuite(unittest.defaultTestLoader.loadTestsFromName( > getUsStatesTest() )) > > in this way I can completely automate every function that returns some > output by dynamically generating its > test functions > > thanks -- http://mail.python.org/mailman/listinfo/python-list