mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Include a traceback for non-strict event loop blocking detection (#118620)
This commit is contained in:
@@ -27,6 +27,7 @@ async def test_raise_for_blocking_call_async_non_strict_core(
|
||||
"""Test non_strict_core raise_for_blocking_call detects from event loop without integration context."""
|
||||
haloop.raise_for_blocking_call(banned_function, strict_core=False)
|
||||
assert "Detected blocking call to banned_function" in caplog.text
|
||||
assert "Traceback (most recent call last)" in caplog.text
|
||||
|
||||
|
||||
async def test_raise_for_blocking_call_async_integration(
|
||||
@@ -130,6 +131,11 @@ async def test_raise_for_blocking_call_async_integration_non_strict(
|
||||
"please create a bug report at https://github.com/home-assistant/core/issues?"
|
||||
"q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+hue%22" in caplog.text
|
||||
)
|
||||
assert "Traceback (most recent call last)" in caplog.text
|
||||
assert (
|
||||
'File "/home/paulus/homeassistant/components/hue/light.py", line 23'
|
||||
in caplog.text
|
||||
)
|
||||
|
||||
|
||||
async def test_raise_for_blocking_call_async_custom(
|
||||
@@ -182,6 +188,11 @@ async def test_raise_for_blocking_call_async_custom(
|
||||
"please create a bug report at https://github.com/home-assistant/core/issues?"
|
||||
"q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+hue%22"
|
||||
) in caplog.text
|
||||
assert "Traceback (most recent call last)" in caplog.text
|
||||
assert (
|
||||
'File "/home/paulus/config/custom_components/hue/light.py", line 23'
|
||||
in caplog.text
|
||||
)
|
||||
|
||||
|
||||
async def test_raise_for_blocking_call_sync(
|
||||
|
||||
Reference in New Issue
Block a user