MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / parse_summary

Function parse_summary

scripts/run-test-wave.py:397–415  ·  view source on GitHub ↗
(log_path: pathlib.Path)

Source from the content-addressed store, hash-verified

395
396
397def parse_summary(log_path: pathlib.Path) -> tuple[int, int, int] | None:
398 try:
399 stream = log_path.open(encoding="utf-8", errors="replace")
400 except OSError as exc:
401 raise RuntimeError(f"cannot read suite log {log_path}: {exc}") from exc
402 last_summary = None
403 with stream:
404 for line in stream:
405 match = SUMMARY.match(line)
406 if match is None:
407 continue
408 failed = FAILED.search(line)
409 skipped = SKIPPED.search(line)
410 last_summary = (
411 int(match.group("passed")),
412 int(failed.group("failed")) if failed is not None else 0,
413 int(skipped.group("skipped")) if skipped is not None else 0,
414 )
415 return last_summary
416
417
418def count_pass_markers(log_path: pathlib.Path) -> int:

Callers 1

record_resultFunction · 0.85

Calls 1

openMethod · 0.80

Tested by

no test coverage detected