Spaces:
Build error
Build error
Download tests/test_extract.py from Varun2007/pageparse.ai: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/spaces/Varun2007/pageparse.ai/resolve/main/tests/test_extract.py
- Command line
-
hf download hf://spaces/Varun2007/pageparse.ai/tests/test_extract.py
-
curl -L -o test_extract.py https://huggingface.co/spaces/Varun2007/pageparse.ai/resolve/main/tests/test_extract.py
571 Bytes
| # SPDX-FileCopyrightText: 2026 Team Centurions | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| from pageparse.schema import SourceParseResult | |
| def test_extract_parse_valid_json(): | |
| raw = '{"source_file": "test.jpg", "captured_date": null, "records": [{"type": "task", "content": "Test", "due_date": null, "priority": "medium", "category": null, "status": "todo", "confidence": 0.95}]}' | |
| result = SourceParseResult.model_validate_json(raw) | |
| assert result.source_file == "test.jpg" | |
| assert len(result.records) == 1 | |
| assert result.records[0].content == "Test" | |