Adds guards for missing information in call stack frames (#27217)
This commit is contained in:
parent
71a3516053
commit
2e17ad86af
5 changed files with 34 additions and 12 deletions
|
@ -72,12 +72,8 @@ async def test_async_create_catching_coro(hass, caplog):
|
|||
|
||||
async def job():
|
||||
raise Exception("This is a bad coroutine")
|
||||
pass
|
||||
|
||||
hass.async_create_task(logging_util.async_create_catching_coro(job()))
|
||||
await hass.async_block_till_done()
|
||||
assert "This is a bad coroutine" in caplog.text
|
||||
assert (
|
||||
"hass.async_create_task("
|
||||
"logging_util.async_create_catching_coro(job()))" in caplog.text
|
||||
)
|
||||
assert "in test_async_create_catching_coro" in caplog.text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue