Spaces:
Sleeping
Sleeping
File size: 567 Bytes
6bb843b edd0a90 fb49a5d 6bb843b fb49a5d 6bb843b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import pytest
from timebench_eval import TimebenchEval
from conftest import (
PREDICTION_1,
PREDICTION_2,
PREDICTION_3,
PREDICTION_4,
PREDICTION_5,
)
@pytest.mark.parametrize(
"prediction,extracted_answer",
[
(PREDICTION_1, "Troyes AC"),
(PREDICTION_2, "August 1804"),
(PREDICTION_3, "unanswerable"),
(PREDICTION_4, "Cardiff City"),
(PREDICTION_5, "B, C"),
],
)
def test_answer_extraction(prediction, extracted_answer):
assert TimebenchEval._extract_answer(prediction) == extracted_answer
|