(tests_mapping, tag_name)
dump loaded/parsed tests data (except functions) to json file.
        the dumped file is located in PWD/logs folder.

    Args:
        tests_mapping (dict): data to dump
        tag_name (str): tag name, loaded/parsed
dump loaded/parsed tests data (except functions) to json file.
        the dumped file is located in PWD/logs folder.
dump loaded / parsed tests data ( except functions ) to json file . the dumped file is located in PWD / logs folder .
def dump_tests(tests_mapping, tag_name):
    """ dump loaded/parsed tests data (except functions) to json file.
        the dumped file is located in PWD/logs folder.

    Args:
        tests_mapping (dict): data to dump
        tag_name (str): tag name, loaded/parsed

    """
    project_mapping = tests_mapping.get("project_mapping", {})
    pwd_dir_path, dump_file_name = _prepare_dump_info(project_mapping, tag_name)

    tests_to_dump = {
        "project_mapping": {}
    }

    for key in project_mapping:
        if key != "functions":
            tests_to_dump["project_mapping"][key] = project_mapping[key]
            continue

        # remove functions in order to dump
        if project_mapping["functions"]:
            debugtalk_py_path = os.path.join(pwd_dir_path, "debugtalk.py")
            tests_to_dump["project_mapping"]["debugtalk.py"] = debugtalk_py_path

    if "api" in tests_mapping:
        tests_to_dump["api"] = tests_mapping["api"]
    elif "testcases" in tests_mapping:
        tests_to_dump["testcases"] = tests_mapping["testcases"]
    elif "testsuites" in tests_mapping:
        tests_to_dump["testsuites"] = tests_mapping["testsuites"]

    dump_json_file(tests_to_dump, pwd_dir_path, dump_file_name)
def dump_tests ( tests_mapping , tag_name ) : project_mapping = tests_mapping . get ( "project_mapping" , { } ) pwd_dir_path , dump_file_name = _prepare_dump_info ( project_mapping , tag_name ) tests_to_dump = { "project_mapping" : { } } for key in project_mapping : if key != "functions" : tests_to_dump [ "project_mapping" ] [ key ] = project_mapping [ key ] continue # remove functions in order to dump if project_mapping [ "functions" ] : debugtalk_py_path = os . path . join ( pwd_dir_path , "debugtalk.py" ) tests_to_dump [ "project_mapping" ] [ "debugtalk.py" ] = debugtalk_py_path if "api" in tests_mapping : tests_to_dump [ "api" ] = tests_mapping [ "api" ] elif "testcases" in tests_mapping : tests_to_dump [ "testcases" ] = tests_mapping [ "testcases" ] elif "testsuites" in tests_mapping : tests_to_dump [ "testsuites" ] = tests_mapping [ "testsuites" ] dump_json_file ( tests_to_dump , pwd_dir_path , dump_file_name )