Skip to content

Commit 9590dc9

Browse files
committed
added a couple of eval unit tests
1 parent e2e14cc commit 9590dc9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_unit_eval.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,14 @@ async def test_eval(hass):
894894
["raise", "Exception in test line 1 column 0: No active exception to reraise"],
895895
["yield", "Exception in test line 1 column 0: test: not implemented ast ast_yield"],
896896
["task.executor(5)", "Exception in test line 1 column 14: function is not callable by task.executor()"],
897+
[
898+
"state.get('pyscript.xyz1.abc')",
899+
"Exception in test line 1 column 10: name 'pyscript.xyz1' is not defined",
900+
],
901+
[
902+
"pyscript.xyz1 = 1; state.get('pyscript.xyz1.abc')",
903+
"Exception in test line 1 column 29: state 'pyscript.xyz1' has no attribute 'abc'",
904+
],
897905
[
898906
"import cmath; exec('xyz = cmath.sqrt(complex(3, 4))', {})",
899907
"Exception in test line 1 column 54: Exception in exec() line 1 column 6: name 'cmath.sqrt' is not defined",

0 commit comments

Comments
 (0)