Spaces:
Sleeping
Sleeping
Download tests/test_app_logic.py from justhariharan/Math-Solver: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/justhariharan/Math-Solver/resolve/main/tests/test_app_logic.py
- Command line
-
hf download hf://spaces/justhariharan/Math-Solver/tests/test_app_logic.py
-
curl -L -o test_app_logic.py https://huggingface.co/spaces/justhariharan/Math-Solver/resolve/main/tests/test_app_logic.py
466 Bytes
| 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 | |