def view_report()

in generate_test_report.py [0:0]


def view_report(report, output, ignore_no_projects=False, branch_breakdown=False):
    """
    Expecting a report with the form (or with test and platform swapped):
    {'test-name': {'platform-name': [projects]}, ...}
    """
    print("Report Breakdown\n")

    for first, second_info in sorted(report.items()):
        indent = "    "
        print(first)

        printed = False
        for second, projects in sorted(second_info.items()):

            def _check_empty(projects):
                if len(projects) == 0:
                    return True
                if len(projects) > 1:
                    return False
                if projects[0] == "none":
                    return True

            if ignore_no_projects and _check_empty(projects):
                continue
            if not branch_breakdown:
                print(indent + second + ": " + ", ".join(projects))
                printed = True
            else:
                print("")
                print(indent + second + ":")
                for entry in projects:
                    print(indent + indent + entry)
                printed = True
        if not printed:
            print(indent + "No tests satisfying criteria")
        print("")
    return