30 lines
1.2 KiB
Python
30 lines
1.2 KiB
Python
|
|
"""The set of (source, options) -> golden file cases.
|
||
|
|
|
||
|
|
Shared by `test_golden.py` and `regenerate_golden.py` so the suite and the
|
||
|
|
regeneration script can never disagree about what should exist.
|
||
|
|
"""
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import Any, Dict, Tuple
|
||
|
|
|
||
|
|
|
||
|
|
# name -> (example filename, renderer options)
|
||
|
|
CASES: Dict[str, Tuple[str, Dict[str, Any]]] = {
|
||
|
|
"trail": ("trail.md", {}),
|
||
|
|
"trail-split": ("trail.md", {"split_level": 2}),
|
||
|
|
"trail-linear": ("trail.md", {"split_level": 2, "menu": False}),
|
||
|
|
"trail-manual": ("trail-manual.md", {}),
|
||
|
|
"trail-select": ("trail-manual.md", {"menu_style": "select"}),
|
||
|
|
"trail-home": ("trail-manual.md", {"home_label": "Home"}),
|
||
|
|
"trail-no-template": ("trail-manual.md", {"template_nav": False}),
|
||
|
|
"trail-paginated": ("trail-manual.md", {"max_card_bytes": 120}),
|
||
|
|
"trail-images-alt": ("trail-manual.md", {"images": "alt"}),
|
||
|
|
"trail-head": ("trail-manual.md", {"cache_control": 0, "access_domain": "example.com"}),
|
||
|
|
"kitchen-sink": ("kitchen-sink.md", {}),
|
||
|
|
}
|
||
|
|
|
||
|
|
# Cases that produce several files; each is written to its own directory.
|
||
|
|
MULTI_CASES: Dict[str, Tuple[str, Dict[str, Any]]] = {
|
||
|
|
"trail-decks": ("trail-manual.md", {"deck_per_card": True, "home_label": "Home"}),
|
||
|
|
}
|