Files
Aislo/resources/tester/test_52_17_single_container.py
T

41 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
"""공용 틀 선택 컨테이너 「하나만」(max) — PLAN 52-17.
순수 규칙은 Node 헬퍼(`helper_52_structure_spec.cjs max`)가 돌림 ·
화면([추가] 숨김)은 ORCA `ui_checks/52-3` · `52-10` · `52-1`.
"""
import json
import os
import subprocess
HERE = os.path.dirname(os.path.abspath(__file__))
def _run():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_52_structure_spec.cjs"), "max"],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_하나만_컨테이너와_여러개_컨테이너():
out = _run()
assert out["max"] == {
"pipe.soil_add": None,
"pipe.chute_add": 1, # 54-48 사용자 10-6: 배관 도수로/돌붙임도 하나만
"ford_pavement.chute": 1,
"etc.detail": 1,
}
def test_옛_저장_둘은_지우지_않음():
out = _run()
assert out["oldTwo"] == 2
assert out["back"] == {"ford_chute_1_structure": "도수로", "ford_chute_2_structure": "돌붙임"}