Same rule as BUG-2413: when a rule has no condition sentence, show the yoga's plain effect, or 「—」. Tables already have an effect column, so a condition cell that would only repeat it reads 「—」; yoga pages do not print the effect as a 「组合」. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp3RzgZVEpT1PXxkwHj
17 lines
1.1 KiB
Python
17 lines
1.1 KiB
Python
"""BUG-2226: the chart page's 格局 cards read the report's condition sentence, cleaned for readers."""
|
|
|
|
from scripts.report_render.appendix_language import reader_yoga_condition_zh
|
|
|
|
|
|
def test_english_twins_states_signs_and_citations_are_cleaned():
|
|
assert reader_yoga_condition_zh({"combination": "太阳Sun在第7宫"}) == "太阳在第7宫"
|
|
assert reader_yoga_condition_zh({"combination": "土星Saturnexalted在Libra"}) == "土星入旺在天秤座"
|
|
assert reader_yoga_condition_zh({"combination": "Raman 198:月亮受凶星夹制"}) == "月亮受凶星夹制"
|
|
assert reader_yoga_condition_zh({"combination": "Rahu在5且非土星Navamsa"}) == "罗睺在5且非土星九分盘"
|
|
|
|
|
|
def test_placeholder_still_says_it_cannot_list():
|
|
# 原值: 「条件未能逐项列出」/ 新值: 这条格局的白话作用,没有就空(星盘页再按 BUG-2413 处理)/ 原因: BUG-2414
|
|
assert reader_yoga_condition_zh({"combination": "自定义条件满足"}) == ""
|
|
assert reader_yoga_condition_zh({"combination": "自定义条件满足", "effects": ["财运亨通"]}) == "财运亨通"
|