From d0bbd9dcc139f4c92698ad648aa9818a7a75d2be Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 14 Feb 2023 13:44:57 -0600 Subject: [PATCH] Fix wemo tests with py3.11 In py3.11 `Passing coroutines is forbidden, use tasks explicitly` --- tests/components/wemo/entity_test_helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/components/wemo/entity_test_helpers.py b/tests/components/wemo/entity_test_helpers.py index 61c7cd5bf2e35c..b85c4843997001 100644 --- a/tests/components/wemo/entity_test_helpers.py +++ b/tests/components/wemo/entity_test_helpers.py @@ -67,7 +67,8 @@ def get_state(force_update=None): # One of these two calls will block on `event`. The other will return right # away because the `_update_lock` is held. done, pending = await asyncio.wait( - [call1(), call2()], return_when=asyncio.FIRST_COMPLETED + [asyncio.create_task(call1()), asyncio.create_task(call2())], + return_when=asyncio.FIRST_COMPLETED, ) _ = [d.result() for d in done] # Allow any exceptions to be raised.