-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve word splitting / text matching (#906)
- Loading branch information
1 parent
9228626
commit 0f9c96c
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
from test_helpers.utils import simple_task_state | ||
|
||
from inspect_ai.scorer import CORRECT, Target, match | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_number_eol(): | ||
scorer = match(numeric=True) | ||
state = simple_task_state(model_output="28 + 32 = 60\nThis solves the problem.") | ||
result = await scorer(state, Target(["60"])) | ||
|
||
assert result.text == CORRECT |