A CI job produced a list of test results, each {"name": ..., "outcome": "passed" | "failed" | "skipped"}. Return a summary dictionary with the counts passed, failed, skipped, total, and
pass_rate: passed divided by (passed + failed) as a percentage rounded to one decimal, or null (None)
when nothing passed or failed.
Implement summarize. Input: results: list[dict]. Returns: dict.
def summarize(results: list[dict]) -> dict:
return {"passed": 0, "failed": 0, "skipped": 0, "total": 0, "pass_rate": None}
Run executes the public tests. Submit grades against public and hidden tests.
A CI job produced a list of test results, each {"name": ..., "outcome": "passed" | "failed" | "skipped"}. Return a summary dictionary with the counts passed, failed, skipped, total, and
pass_rate: passed divided by (passed + failed) as a percentage rounded to one decimal, or null (None)
when nothing passed or failed.
Implement summarize. Input: results: list[dict]. Returns: dict.
def summarize(results: list[dict]) -> dict:
return {"passed": 0, "failed": 0, "skipped": 0, "total": 0, "pass_rate": None}
Run executes the public tests. Submit grades against public and hidden tests.