scl_templates: Aufruf-Template FB_ILS_MTRO_2Sep2Swi (ohne Referenz-Aufrufstelle)
Mubea wird damit vollstaendig aus Templates erzeugt. Der FB existiert noch nicht in der ILSLib; die Schnittstelle ist aus 2Sep1Swi (Separatoren) und 1Sep2Swi (Weichen) angenommen und steht im Template-Kopf - mit den SPS-Kollegen abzustimmen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dd955999a9
commit
25ab362c0a
7 files changed
+215
-52
No files matched your search
@@ -17,6 +17,7 @@ Diff pruefen, dann die Referenzen neu schreiben mit
|
||||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
@@ -101,7 +102,7 @@ def test_cli_schreibt_referenz(name: str, tmp_path: Path, monkeypatch) -> None:
|
||||
|
||||
def test_cli_templates_und_strict(tmp_path: Path, monkeypatch) -> None:
|
||||
"""--templates schreibt die Template-Referenz; --strict bricht ab, solange
|
||||
ein FB-Typ der Anlage (mubea: u. a. 2Sep2Swi) kein Template hat."""
|
||||
ein FB-Typ der Anlage kein Template hat (hier: Template-Ordner ohne 2Sep2Swi)."""
|
||||
if _aktualisieren():
|
||||
pytest.skip("Referenzen werden nur ueber die render-Tests geschrieben")
|
||||
monkeypatch.setenv("SKEL_RESULTS", str(tmp_path))
|
||||
@@ -113,7 +114,11 @@ def test_cli_templates_und_strict(tmp_path: Path, monkeypatch) -> None:
|
||||
assert _maskiert(ist) == soll
|
||||
|
||||
(tmp_path / "mubea_FB_Main.scl").unlink()
|
||||
assert scl_skeleton.main(["--json", json_file, "--templates", "--strict"]) == 1
|
||||
ohne_2sep2swi = tmp_path / "templates"
|
||||
shutil.copytree(scl_skeleton.TEMPLATE_DIR, ohne_2sep2swi)
|
||||
(ohne_2sep2swi / "FB_ILS_MTRO_2Sep2Swi.scl.j2").unlink()
|
||||
assert scl_skeleton.main(["--json", json_file, "--templates", str(ohne_2sep2swi),
|
||||
"--strict"]) == 1
|
||||
assert not (tmp_path / "mubea_FB_Main.scl").exists()
|
||||
|
||||
assert scl_skeleton.main(["--json", json_file, "--templates",
|
||||
|
||||
Reference in new issue
Block a user