Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
"""BUG-2118: two underscore codes left in the data chapters of a real staging report."""
|
|
|
|
from scripts.report_render.upstream_sync_chapters import _sensitivity_value
|
|
|
|
STABLE = {
|
|
"house_1": {"sign": "Virgo", "nakshatra_lord": "Sun", "sub_lord": "Rahu"},
|
|
"house_4": {"sign": "Sagittarius", "nakshatra_lord": "Ketu", "sub_lord": "Ketu"},
|
|
}
|
|
|
|
|
|
def test_stable_kp_cusps_read_as_one_cusp_set() -> None:
|
|
zh = _sensitivity_value(STABLE, "zh")
|
|
en = _sensitivity_value(STABLE, "en")
|
|
assert zh == "1宫 处女座(星宿主太阳,分主罗睺),4宫 射手座(星宿主计都,分主计都)"
|
|
assert en.startswith("H1 ") and "H4 " in en
|
|
for text in (zh, en):
|
|
assert "nakshatra_lord" not in text and "sub_lord" not in text and "House_" not in text and "house_" not in text
|
|
|
|
|
|
def test_minute_keyed_kp_cusps_unchanged() -> None:
|
|
zh = _sensitivity_value({"19:14": STABLE}, "zh")
|
|
assert zh.startswith("19:14:1宫 处女座(星宿主太阳,分主罗睺)")
|
|
|
|
|
|
def test_tajika_pair_headers_are_words() -> None:
|
|
import inspect
|
|
import scripts.pl9_reader_export as module
|
|
|
|
source = inspect.getsource(module)
|
|
assert "'planet_a': '行星一', 'planet_b': '行星二'" in source
|