How to use the green.loader.GreenTestLoader.suiteClass function in green

To help you get started, we’ve selected a few green examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleanCut / green / green / loader.py View on Github external
def flattenTestSuite(test_suite):
    tests = []
    for test in test_suite:
        if isinstance(test, unittest.BaseTestSuite):
            tests.extend(flattenTestSuite(test))
        else:
            tests.append(test)
    return GreenTestLoader.suiteClass(tests)