Files
Jyotisha/tests/test_reader_yoga_condition_2226.py
ClaudeandClaude Opus 5.5 1a2d463e65
Independent Staging Quality Gate / validate-frontend (push) Canceled after 0s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Independent Staging Quality Gate / validate-python (push) Canceled after 3m19s
fix(report): no yoga table or page falls back to 「条件未能逐项列出」; the plain effect stands in, as on the chart page (BUG-2414)
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
2026-11-26 12:47:29 +08:00

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": ["财运亨通"]}) == "财运亨通"