def expand_test_files(test_dirs, names):
    """
    Expand the list of test files and test descriptions.

    The list is split on sync points and duplicates in
    each set are removed.

    Returns:
        List of test files split into sets by sync points.
    Raises:
        IpaUtilsException: If names is not a list.
    """
    if not isinstance(names, list):
        raise IpaUtilsException(
            'Names must be a list containing test names'
            ' and/or test descriptions.'
        )

    tests, descriptions = get_test_files(test_dirs)

    expanded_names = []
    for name in names:
        if name in descriptions:
            expanded_names += get_tests_from_description(
                name,
                descriptions
            )
        else:
            expanded_names.append(name)

    return parse_sync_points(expanded_names, tests)
def expand_test_files ( test_dirs , names ) : if not isinstance ( names , list ) : raise IpaUtilsException ( 'Names must be a list containing test names' ' and/or test descriptions.' ) tests , descriptions = get_test_files ( test_dirs ) expanded_names = [ ] for name in names : if name in descriptions : expanded_names += get_tests_from_description ( name , descriptions ) else : expanded_names . append ( name ) return parse_sync_points ( expanded_names , tests )
Expand the list of test files and test descriptions.

    The list is split on sync points and duplicates in
    each set are removed.

    Returns:
        List of test files split into sets by sync points.
    Raises:
        IpaUtilsException: If names is not a list.