@staticmethod<EOL><INDENT>def load_file(yaml_file):<DEDENT>
testset = {<EOL>"<STR_LIT>": yaml_file,<EOL>"<STR_LIT>": {},<EOL>"<STR_LIT>": [],<EOL>}<EOL>if not os.path.isfile(yaml_file):        <EOL><INDENT>raise p_exception.FileNotFoundError("<STR_LIT>".format(yaml_file))<EOL><DEDENT>try:<EOL><INDENT>test_cases = FileUtils.load_file(yaml_file)<EOL>logger.log_debug(u"<STR_LIT>".format(test_cases))<EOL>for item in test_cases:<EOL><INDENT>if not isinstance(item, dict) or len(item) != <NUM_LIT:1>:<EOL><INDENT>raise p_exception.FileFormatError("<STR_LIT>".format(yaml_file))<EOL><DEDENT>key, test_block = item.popitem()<EOL>if not isinstance(test_block, dict):<EOL><INDENT>raise p_exception.FileFormatError("<STR_LIT>".format(yaml_file))<EOL><DEDENT>if key == "<STR_LIT>":<EOL><INDENT>testset["<STR_LIT>"].update(test_block)<EOL>testset["<STR_LIT:name>"] = test_block.get("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>elif key == "<STR_LIT>":<EOL><INDENT>case_id = test_block.pop("<STR_LIT:id>","<STR_LIT>")                    <EOL>if not case_id:<EOL><INDENT>raise p_exception.ModelFormatError("<STR_LIT>")<EOL><DEDENT>if not re.search("<STR_LIT>",case_id):<EOL><INDENT>raise p_exception.ModelFormatError("<STR_LIT>".format(case_id))<EOL>
load yaml file
        @param yaml_file: yaml file path
        @return: testset