Skip to content

Commit

Permalink
Merge pull request #197 from wenting-zhao/main
Browse files Browse the repository at this point in the history
Handle xfail in grading
  • Loading branch information
john-b-yang authored Oct 7, 2024
2 parents 58d3d81 + 5b2d7ad commit 98dde0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions swebench/harness/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class TestStatus(Enum):
PASSED = "PASSED"
SKIPPED = "SKIPPED"
ERROR = "ERROR"
XFAIL = "XFAIL"

TEST_PYTEST = "pytest --no-header -rA --tb=no -p no:cacheprovider"
TEST_PYTEST_VERBOSE = "pytest -rA --tb=long -p no:cacheprovider"
Expand Down
2 changes: 1 addition & 1 deletion swebench/harness/grading.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# MARK: Utility functions
def test_passed(case: str, sm: dict[str, str]) -> bool:
return case in sm and sm[case] == TestStatus.PASSED.value
return case in sm and sm[case] in [TestStatus.PASSED.value, TestStatus.XFAIL.value]


def test_failed(case: str, sm: dict[str, str]) -> bool:
Expand Down

0 comments on commit 98dde0e

Please sign in to comment.