Spaces:
Sleeping
Sleeping
File size: 466 Bytes
4ee5f09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from app_logic import extract_answer
def test_extracts_explicit_integer_answer():
assert extract_answer("Compute 4 + 5. #### 9") == "9"
def test_extracts_currency_and_commas():
assert extract_answer("#### $1,250") == "1250"
def test_does_not_vote_on_numbers_in_unmarked_reasoning():
assert extract_answer("I tried 2 and 3, then got 5") is None
def test_rejects_marked_answer_without_a_number():
assert extract_answer("#### not sure") is None
|