def _prepare_source(selector, source):
    """Normalize source rows and selectors."""
    tablename, fields = get_data_specifier(selector)
    if len(fields) != 1:
        raise ItsdbError(
            'Selector must specify exactly one data column: {}'
            .format(selector)
        )
    if isinstance(source, TestSuite):
        if not tablename:
            tablename = source.relations.find(fields[0])[0]
        source = source[tablename]
    cols = list(source.fields.keys()) + fields
    return source, cols
def _prepare_source ( selector , source ) : tablename , fields = get_data_specifier ( selector ) if len ( fields ) != 1 : raise ItsdbError ( 'Selector must specify exactly one data column: {}' . format ( selector ) ) if isinstance ( source , TestSuite ) : if not tablename : tablename = source . relations . find ( fields [ 0 ] ) [ 0 ] source = source [ tablename ] cols = list ( source . fields . keys ( ) ) + fields return source , cols
Normalize source rows and selectors.