Annual clock captions no longer end with "this report's native calculation"; the general dasha reference drops its per-lord study-notes citation; the birth data section translates user_reported / family_exact and the other stored codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
26 lines
1.2 KiB
Python
26 lines
1.2 KiB
Python
"""BUG-2115: the reader's report carries no library names and no 「来源」 lines (owner, 2026-11-21)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from scripts.report_render.dasha_reference import render_dasha_reference
|
|
from scripts.report_render.upstream_sync_chapters import _word
|
|
|
|
|
|
def test_dasha_reference_has_no_source_line() -> None:
|
|
zh = render_dasha_reference("zh")
|
|
en = render_dasha_reference("en")
|
|
assert "### " in zh and "### " in en
|
|
assert "来源:" not in zh and "读书笔记" not in zh and "PDF 页" not in zh
|
|
assert "Source:" not in en and "PDF page" not in en
|
|
|
|
|
|
def test_birth_provenance_codes_are_reader_words() -> None:
|
|
for code in ("user_reported", "family_exact", "family_clear", "family_vague", "hospital_record",
|
|
"id_document", "approximate", "period_only", "unknown", "legacy_import", "caller_supplied"):
|
|
zh = _word(code, "zh")
|
|
en = _word(code, "en")
|
|
assert "_" not in zh and not any("a" <= char <= "z" for char in zh), (code, zh)
|
|
assert "_" not in en and en != "—", (code, en)
|
|
assert _word("user_reported", "zh") == "用户填写"
|
|
assert _word("family_exact", "zh") == "家人记得的确切时间"
|