feat: composer improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user