File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11"""Unit tests for Python interpreter."""
22
3+ from pytest_homeassistant_custom_component .common import MockConfigEntry
4+
35from custom_components .pyscript .const import CONF_ALLOW_ALL_IMPORTS , CONFIG_ENTRY , DOMAIN
46from custom_components .pyscript .eval import AstEval
57from custom_components .pyscript .function import Function
68from custom_components .pyscript .global_ctx import GlobalContext , GlobalContextMgr
79from custom_components .pyscript .state import State
810from custom_components .pyscript .trigger import TrigTime
9- from pytest_homeassistant_custom_component .common import MockConfigEntry
1011
1112evalTests = [
1213 ["1" , 1 ],
4344 ["1 and True" , True ],
4445 ["1 and False" , False ],
4546 ["0 and False" , 0 ],
47+ ["None or 2" , 2 ],
48+ ["False or 3" , 3 ],
49+ ["None or 'xyz'" , "xyz" ],
50+ ["False or 'xyz'" , "xyz" ],
4651 ["0 or 1" , 1 ],
4752 ["0 or 0" , 0 ],
4853 ["0 or True" , True ],
You can’t perform that action at this time.
0 commit comments