Spaces:
Sleeping
Sleeping
Download backend/tests/test_client_examples_parser.py from ascentialabs/PDC: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/ascentialabs/PDC/resolve/main/backend/tests/test_client_examples_parser.py
- Command line
-
hf download hf://spaces/ascentialabs/PDC/backend/tests/test_client_examples_parser.py
-
curl -L -o test_client_examples_parser.py https://huggingface.co/spaces/ascentialabs/PDC/resolve/main/backend/tests/test_client_examples_parser.py
1.05 kB
| """Parser coverage for all 8 client spreadsheet examples.""" | |
| from __future__ import annotations | |
| from tests.fixtures.client_examples import EXAMPLES_PATH, load_client_examples | |
| def test_examples_workbook_exists(): | |
| assert EXAMPLES_PATH.exists() | |
| def test_all_eight_examples_load(): | |
| examples = load_client_examples() | |
| assert len(examples) == 8 | |
| assert {e["sheet"] for e in examples} == { | |
| f"Example {i}" for i in range(1, 9) | |
| } | |
| def test_each_example_has_required_fields(): | |
| for ex in load_client_examples(): | |
| assert ex["inputs"].get("warp_count") is not None | |
| assert ex["inputs"].get("weft_count") is not None | |
| assert ex["inputs"].get("finish_epi") is not None | |
| assert ex["inputs"].get("finish_ppi") is not None | |
| assert ex["inputs"].get("weave") | |
| assert ex["inputs"].get("blend") | |
| assert len(ex["gsm_cases"]) == 4 | |
| assert ex["expected"]["finish_epi"] is not None | |
| assert ex["expected"]["finish_ppi"] is not None | |
| assert len(ex["archive_matches"]) > 0 | |