Merge remote-tracking branch 'origin/dev' into main_laptop_1
This commit is contained in:
@@ -45,9 +45,9 @@ def _sheet(type_id: str, **options) -> dict:
|
||||
}
|
||||
|
||||
|
||||
def test_뒷길이가_없으면_무엇을_고르면_되는지_적는다() -> None:
|
||||
reason = figure_reason(_sheet("masonry_wet"))
|
||||
assert reason is not None and "뒷길이" in reason and "섭니다" in reason
|
||||
def test_뒷길이가_없어도_표처럼_기본값으로_서니_까닭이_없다() -> None:
|
||||
"""2026-09-14 브레인 판정 — 표가 기본 45㎝ 로 서면 그림도 섬(까닭은 정말 못 그리는 장만)."""
|
||||
assert figure_reason(_sheet("masonry_wet")) is None
|
||||
|
||||
|
||||
def test_뒷길이가_있으면_까닭이_없다() -> None:
|
||||
|
||||
@@ -16,6 +16,10 @@ from B08_Quantity.B08_Quantity_Engine_StructureFigure import ( # noqa: E402
|
||||
attach_figures,
|
||||
build_figure,
|
||||
)
|
||||
from B08_Quantity.B08_Quantity_Engine_UnitQuantity import ( # noqa: E402
|
||||
back_length_default_note,
|
||||
stone_masonry,
|
||||
)
|
||||
|
||||
|
||||
def _sheet(**options) -> dict:
|
||||
@@ -65,6 +69,34 @@ def test_못_그리는_장은_그림_대신_까닭이_실린다() -> None:
|
||||
}
|
||||
attach_figures(payload)
|
||||
no_back, boulder, drawn = payload["sheets"]
|
||||
assert no_back["figure"] is None and "뒷길이" in no_back["figure_reason"]
|
||||
# 뒷길이 미정은 기본값이 있어 **그림이 섬**(2026-09-14 브레인 판정) — 까닭은 직경 축만.
|
||||
assert no_back["figure_reason"] is None and no_back["figure"]
|
||||
assert boulder["figure"] is None and "직경" in boulder["figure_reason"]
|
||||
assert drawn["figure_reason"] is None and drawn["figure"]
|
||||
|
||||
|
||||
def _texts(shapes: list[dict]) -> list[str]:
|
||||
return [shape["text"] for shape in shapes if shape["kind"] == "text"]
|
||||
|
||||
|
||||
def test_기본값으로_그린_장은_표_사유와_같은_말을_적는다() -> None:
|
||||
options = {"height_m": 2.0}
|
||||
_rows, table_notes = stone_masonry(2.0, 1.0, options, wet=False)
|
||||
table_default = [note for note in table_notes if "뒷길이를 안 골라" in note]
|
||||
assert table_default == [back_length_default_note(options, 45)]
|
||||
|
||||
texts = _texts(build_figure(_sheet()))
|
||||
assert table_default[0] in texts
|
||||
assert "뒷길이 ℓ₃ = 45㎝ (기본)" in texts
|
||||
# 두께도 기본 45 로 — 상부 0.45+0.30
|
||||
assert "상부 0.75 m" in texts
|
||||
|
||||
chosen = _texts(build_figure(_sheet(back_len_cm=45)))
|
||||
assert "뒷길이 ℓ₃ = 45㎝" in chosen and not any("안 골라" in text for text in chosen)
|
||||
assert back_length_default_note({"back_len_cm": 45}, 45) is None
|
||||
|
||||
|
||||
def test_양식_장은_양식이_푼_뒷길이로_그린다() -> None:
|
||||
sheet = {**_sheet(), "formula_sheet": {"vars": {"L3": 55}}}
|
||||
texts = _texts(build_figure(sheet))
|
||||
assert "뒷길이 ℓ₃ = 55㎝ (기본)" in texts and "상부 0.85 m" in texts
|
||||
|
||||
Reference in New Issue
Block a user