(config, project_mapping)
parse testcase/testsuite config, include variables and name.
parse testcase/testsuite config, include variables and name.
parse testcase / testsuite config include variables and name .
def __parse_config(config, project_mapping):
    """ parse testcase/testsuite config, include variables and name.
    """
    # get config variables
    raw_config_variables = config.pop("variables", {})
    raw_config_variables_mapping = utils.ensure_mapping_format(raw_config_variables)
    override_variables = utils.deepcopy_dict(project_mapping.get("variables", {}))
    functions = project_mapping.get("functions", {})

    # override config variables with passed in variables
    raw_config_variables_mapping.update(override_variables)

    # parse config variables
    parsed_config_variables = {}

    for key in raw_config_variables_mapping:
        parsed_value = parse_data(
            raw_config_variables_mapping[key],
            raw_config_variables_mapping,
            functions,
            raise_if_variable_not_found=False
        )
        raw_config_variables_mapping[key] = parsed_value
        parsed_config_variables[key] = parsed_value

    if parsed_config_variables:
        config["variables"] = parsed_config_variables

    # parse config name
    config["name"] = parse_data(
        config.get("name", ""),
        parsed_config_variables,
        functions
    )

    # parse config base_url
    if "base_url" in config:
        config["base_url"] = parse_data(
            config["base_url"],
            parsed_config_variables,
            functions
        )
def __parse_config ( config , project_mapping ) : # get config variables raw_config_variables = config . pop ( "variables" , { } ) raw_config_variables_mapping = utils . ensure_mapping_format ( raw_config_variables ) override_variables = utils . deepcopy_dict ( project_mapping . get ( "variables" , { } ) ) functions = project_mapping . get ( "functions" , { } ) # override config variables with passed in variables raw_config_variables_mapping . update ( override_variables ) # parse config variables parsed_config_variables = { } for key in raw_config_variables_mapping : parsed_value = parse_data ( raw_config_variables_mapping [ key ] , raw_config_variables_mapping , functions , raise_if_variable_not_found = False ) raw_config_variables_mapping [ key ] = parsed_value parsed_config_variables [ key ] = parsed_value if parsed_config_variables : config [ "variables" ] = parsed_config_variables # parse config name config [ "name" ] = parse_data ( config . get ( "name" , "" ) , parsed_config_variables , functions ) # parse config base_url if "base_url" in config : config [ "base_url" ] = parse_data ( config [ "base_url" ] , parsed_config_variables , functions )