def iter_suite_tests(suite):
 for item in suite._tests:
  if isinstance(item, unittest.TestCase):
   (yield item)
  elif isinstance(item, unittest.TestSuite):
   for r in iter_suite_tests(item):
    (yield r)
  else:
   raise Exception(('unknown object %r inside test suite %r' % (item, suite)))

def iter_suite_tests ( suite ) : for item in suite . _tests : if isinstance ( item , unittest . TestCase ) : ( yield item ) elif isinstance ( item , unittest . TestSuite ) : for r in iter_suite_tests ( item ) : ( yield r ) else : raise Exception ( ( 'unknown object %r inside test suite %r' % ( item , suite ) ) )
return all tests in a suite .