def splitTestSet(commandList,granularity_n):
    """
    Divide test case into granularity parts.
    """
    subsets = []
    start = 0
    for i in range(granularity_n):
        subset = commandList[start:start + (len(commandList) - start) / \
                                           (granularity_n - i)]
        subsets.append(subset)
        start = start + len(subset)
    assert len(subsets) == granularity_n
    for s in subsets:
        assert len(s) > 0
    return subsets

    Divide test case into granularity parts.
    
recipes/Python/578144_Delta_Debug__DDMin_/recipe-578144.py