Raise ImportError in python_script (#134792)

This commit is contained in:
G Johansson
2025-01-06 14:52:40 +01:00
committed by GitHub
parent e4eb414be8
commit d896b4e66a
2 changed files with 2 additions and 2 deletions

View File

@@ -711,4 +711,4 @@ async def test_no_other_imports_allowed(
source = "import sys"
hass.async_add_executor_job(execute, hass, "test.py", source, {})
await hass.async_block_till_done(wait_background_tasks=True)
assert "Error executing script: Not allowed to import sys" in caplog.text
assert "ImportError: Not allowed to import sys" in caplog.text