def list_of_tests_gen(s):
    """ a generator of tests from a suite
  """
for test in s:
    if unittest.suite._isnotsuite(test):
        yield test
else:
    for t in list_of_tests_gen(test):
        yield t
How can I extract a list of TestCases from a TestSuite?