[Ml-yokadi] Test suite

Sébastien Renard Sebastien.Renard
Mar 30 Déc 15:43:35 CET 2008


Hello,

Better late than never, I am learning how to unit test with Python. 

Reading the test.py module of Yokadi, I wonder if the main() function is 
really usefull.

def main():
    testCases = [
        ParseUtilsTestCase,
        YokadiOptionParserTestCase,
        ]
    suites = [unittest.TestLoader().loadTestsFromTestCase(x) for x in 
testCases]
    suite = unittest.TestSuite(suites)
    runner = unittest.TextTestRunner()
    runner.run(suite)


It seems that just calling unittest.main() does the same. As am a noob in 
unittest I do not dare to commit the change.

Is it correct or dumb ?

-- 
Sébastien


Plus d'informations sur la liste de diffusion Ml-yokadi