[Docstring-checkins] CVS: dps/test UnitTestFolder.py,1.2,1.3
Status: Pre-Alpha
Brought to you by:
goodger
From: David G. <go...@us...> - 2002-01-16 02:40:32
|
Update of /cvsroot/docstring/dps/test In directory usw-pr-cvs1:/tmp/cvs-serv26802/dps/test Modified Files: UnitTestFolder.py Log Message: more selective catching exceptions Index: UnitTestFolder.py =================================================================== RCS file: /cvsroot/docstring/dps/test/UnitTestFolder.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UnitTestFolder.py 2001/09/20 02:57:46 1.2 --- UnitTestFolder.py 2002/01/16 02:40:29 1.3 *************** *** 97,107 **** try: suite = getattr(module, 'suite') - if type(suite) == types.FunctionType: - testSuite.addTest(suite()) - elif type(suite) == types.InstanceType \ - and isinstance(suite, unittest.TestSuite): - testSuite.addTest(suite) - else: - raise AssertionError, "don't understand suite" except AttributeError: # Look for individual tests --- 97,100 ---- *************** *** 111,114 **** --- 104,115 ---- # to cheat: testSuite.addTest(moduleTests) + continue + if type(suite) == types.FunctionType: + testSuite.addTest(suite()) + elif type(suite) == types.InstanceType \ + and isinstance(suite, unittest.TestSuite): + testSuite.addTest(suite) + else: + raise AssertionError, "don't understand suite (%s)" % modpath return testSuite |