feat: composer improvements

This commit is contained in:
2026-04-05 09:53:01 +02:00
parent 7838760ca4
commit e1db06104e
17 changed files with 1301 additions and 332 deletions

View File

@@ -36,7 +36,7 @@ def test_if_block():
text "Critical"'''
result = uframe.compile(source)
assert result.is_dynamic
assert "if {val} > 90:" in result.script
assert "if val > 90:" in result.script
def test_for_loop():
@@ -46,7 +46,7 @@ def test_for_loop():
text "$item"'''
result = uframe.compile(source)
assert result.is_dynamic
assert "for item in _iter({items}):" in result.script
assert "for item in _iter(items):" in result.script
def test_let_variable():
@@ -120,5 +120,5 @@ def test_codegen_complete_dashboard():
assert "#!/usr/bin/env python3" in script
assert "_cache_seconds = 0" in script
assert "_shell" in script
assert "if {cpu} > 90:" in script
assert "if cpu > 90:" in script
assert "uframe.compile" in script