Spaces:
Sleeping
Sleeping
| """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 | |