Skip to content

Add color coding to test status in summary - #43

Open
brettcannon wants to merge 1 commit into
python:mainfrom
brettcannon:test-result-colours
Open

brettcannon wants to merge 1 commit into
python:mainfrom
brettcannon:test-result-colours

Conversation

@brettcannon

Copy link
Copy Markdown
Member

With all the statuses being the same length, it's hard to spot any outliers.

@brettcannon
brettcannon requested a review from itamaro November 6, 2026 21:53
results = json.load(file)
lines += [f"### `--strategy {strategy}`", "", "| Check | Status | Summary |", "|---|---|---|"]
lines += [f"| `{r['name']}` | {r['status']} | {r['summary']} |" for r in results]
lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results]
lines += [f"| `{r['name']}` | {colours[r['status']]} {r['status']} | {r['summary']} |" for r in results]

Before:

Image

https://github.com/python/prebuilt-cpython/actions/runs/42300410757?pr=43

After:

Image

https://github.com/hugovk/prebuilt-cpython/actions/runs/42302829021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants