Download tests/test_app_errors.py from build-small-hackathon/blood-test-explainer: direct link, hf CLI and curl.
- Browser
- Download file 434 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/blood-test-explainer/resolve/refs%2Fpr%2F1/tests/test_app_errors.py
- Command line
-
hf download hf://spaces/build-small-hackathon/blood-test-explainer@refs/pr/1/tests/test_app_errors.py
-
curl -L -o test_app_errors.py https://huggingface.co/spaces/build-small-hackathon/blood-test-explainer/resolve/refs%2Fpr%2F1/tests/test_app_errors.py
434 Bytes
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[1])) | |
| from app import _format_extraction_error # noqa: E402 | |
| def test_llamacpp_load_failure_message_is_specific(): | |
| message = _format_extraction_error(ValueError("Failed to load model from file: /tmp/model.gguf")) | |
| assert "llama.cpp backend could not load the GGUF model" in message | |
| assert "background worker problem" in message | |