def decorate(test, decorator):

    try:
        tests = iter(test)
    except TypeError:
        return decorator(test)

    # At this point, we know that 'test' is a test suite.
    _clearSuite(test)

    for case in tests:
        test.addTest(decorate(case, decorator))
    return test
Decorate all test cases in C{test} with C{decorator}.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/unittest.py/decorate