1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-23 20:39:01 +00:00

Enable Ruff PT012 (#113957)

This commit is contained in:
Sid
2024-06-08 17:59:08 +02:00
committed by GitHub
parent 915658daa1
commit 721b2c2ca8
90 changed files with 341 additions and 429 deletions

View File

@@ -450,7 +450,6 @@ async def test_service_response_data_errors(
with pytest.raises(vol.Invalid, match=expected_error):
await script_obj.async_run(context=context)
await hass.async_block_till_done()
async def test_data_template_with_templated_key(hass: HomeAssistant) -> None:
@@ -4903,15 +4902,15 @@ async def test_script_mode_queued_cancel(hass: HomeAssistant) -> None:
assert script_obj.is_running
assert script_obj.runs == 2
task2.cancel()
with pytest.raises(asyncio.CancelledError):
task2.cancel()
await task2
assert script_obj.is_running
assert script_obj.runs == 2
task1.cancel()
with pytest.raises(asyncio.CancelledError):
task1.cancel()
await task1
assert not script_obj.is_running