File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""Unit tests for Python interpreter."""
2
2
3
+ from pytest_homeassistant_custom_component .common import MockConfigEntry
4
+
3
5
from custom_components .pyscript .const import CONF_ALLOW_ALL_IMPORTS , CONFIG_ENTRY , DOMAIN
4
6
from custom_components .pyscript .eval import AstEval
5
7
from custom_components .pyscript .function import Function
6
8
from custom_components .pyscript .global_ctx import GlobalContext , GlobalContextMgr
7
9
from custom_components .pyscript .state import State
8
10
from custom_components .pyscript .trigger import TrigTime
9
- from pytest_homeassistant_custom_component .common import MockConfigEntry
10
11
11
12
evalTests = [
12
13
["1" , 1 ],
43
44
["1 and True" , True ],
44
45
["1 and False" , False ],
45
46
["0 and False" , 0 ],
47
+ ["None or 2" , 2 ],
48
+ ["False or 3" , 3 ],
49
+ ["None or 'xyz'" , "xyz" ],
50
+ ["False or 'xyz'" , "xyz" ],
46
51
["0 or 1" , 1 ],
47
52
["0 or 0" , 0 ],
48
53
["0 or True" , True ],
You can’t perform that action at this time.
0 commit comments