Skip to content

Commit

Permalink
Merge pull request #212 from yuxqiu/sympy-log-parser
Browse files Browse the repository at this point in the history
fix: sympy log parser fails to recognize the last test case
  • Loading branch information
john-b-yang authored Oct 7, 2024
2 parents 072bbe3 + fac4514 commit 88b9348
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swebench/harness/log_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ def parse_log_sympy(log: str) -> dict[str, str]:
for line in log.split("\n"):
line = line.strip()
if line.startswith("test_"):
if line.endswith("[FAIL]") or line.endswith("[OK]"):
line = line[: line.rfind("[")]
line = line.strip()
if line.endswith(" E"):
test = line.split()[0]
test_status_map[test] = TestStatus.ERROR.value
Expand Down

0 comments on commit 88b9348

Please sign in to comment.