Private
Public Access
0
0

fix(run_tests_batched): colorize non-xdist format (tests/... STATUS), filter 'Error during log pruning' noise

This commit is contained in:
2026-06-08 01:54:56 -04:00
parent 272b7841ae
commit 5c6eb620a1
+9
View File
@@ -89,11 +89,13 @@ _NOISE_PREFIXES: tuple[str, ...] = (
"[LogPruner]",
"[startup]",
"created: ",
"Error during log pruning",
"=========",
)
_NOISE_SUBSTRINGS: tuple[str, ...] = (
"[WinError",
"File must be opened in binary mode",
)
def _format_pytest_line(line: str) -> str | None:
@@ -114,6 +116,13 @@ def _format_pytest_line(line: str) -> str | None:
return _c(stripped, _C.BOLD_RED)
if " ERROR " in stripped and "[gw" in stripped:
return _c(stripped, _C.BOLD_RED)
if stripped.startswith(("tests/", "tests\\")) and "::" in stripped:
if " PASSED" in stripped:
return _c(stripped, _C.GREEN)
if " FAILED" in stripped:
return _c(stripped, _C.BOLD_RED)
if " ERROR" in stripped:
return _c(stripped, _C.BOLD_RED)
if stripped.startswith(("PASSED", "FAILED", "ERROR")) and "::" in stripped:
status = stripped.split()[0]
rest = stripped[len(status):]