Adds guards for missing information in call stack frames (#27217)

This commit is contained in:
Franck Nijhof 2019-10-05 11:59:34 +02:00 committed by Pascal Vizeli
parent 71a3516053
commit 2e17ad86af
5 changed files with 34 additions and 12 deletions

View file

@ -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