Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c59404b

Browse filesBrowse files
authored
Fix additional test cases for Python 3.12 (#101006)
1 parent 9fdc849 commit c59404b
Copy full SHA for c59404b

File tree

Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed

‎tests/components/hassio/test_handler.py

Copy file name to clipboardExpand all lines: tests/components/hassio/test_handler.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ async def test_api_ingress_panels(
320320
],
321321
)
322322
async def test_api_headers(
323+
aiohttp_raw_server, # 'aiohttp_raw_server' must be before 'hass'!
323324
hass,
324-
aiohttp_raw_server,
325325
socket_enabled,
326326
api_call: str,
327327
method: Literal["GET", "POST"],

‎tests/helpers/test_script.py

Copy file name to clipboardExpand all lines: tests/helpers/test_script.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ async def test_multiple_runs_wait(hass: HomeAssistant, action_type) -> None:
10531053
hass.states.async_set("switch.test", "on")
10541054
hass.async_create_task(script_obj.async_run(context=Context()))
10551055
await asyncio.wait_for(wait_started_flag.wait(), 1)
1056+
await asyncio.sleep(0)
10561057

10571058
assert script_obj.is_running
10581059
assert len(events) == 1
@@ -1062,6 +1063,7 @@ async def test_multiple_runs_wait(hass: HomeAssistant, action_type) -> None:
10621063
wait_started_flag.clear()
10631064
hass.async_create_task(script_obj.async_run())
10641065
await asyncio.wait_for(wait_started_flag.wait(), 1)
1066+
await asyncio.sleep(0)
10651067
except (AssertionError, asyncio.TimeoutError):
10661068
await script_obj.async_stop()
10671069
raise
@@ -4079,6 +4081,7 @@ async def test_script_mode_2(
40794081
hass.states.async_set("switch.test", "on")
40804082
hass.async_create_task(script_obj.async_run(context=Context()))
40814083
await asyncio.wait_for(wait_started_flag.wait(), 1)
4084+
await asyncio.sleep(0)
40824085

40834086
assert script_obj.is_running
40844087
assert len(events) == 1
@@ -4089,6 +4092,7 @@ async def test_script_mode_2(
40894092
wait_started_flag.clear()
40904093
hass.async_create_task(script_obj.async_run(context=Context()))
40914094
await asyncio.wait_for(wait_started_flag.wait(), 1)
4095+
await asyncio.sleep(0)
40924096

40934097
assert script_obj.is_running
40944098
assert len(events) == 2

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.