Update import locations in tests (#122216)
This commit is contained in:
parent
0637e342f6
commit
a6068dcdf2
46 changed files with 131 additions and 125 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import asyncio
|
||||
from collections.abc import Iterator
|
||||
import subprocess
|
||||
import threading
|
||||
from unittest.mock import patch
|
||||
|
||||
|
@ -169,21 +170,21 @@ def test_enable_posix_spawn() -> None:
|
|||
yield from packaging.tags.parse_tag("cp311-cp311-musllinux_1_1_x86_64")
|
||||
|
||||
with (
|
||||
patch.object(runner.subprocess, "_USE_POSIX_SPAWN", False),
|
||||
patch.object(subprocess, "_USE_POSIX_SPAWN", False),
|
||||
patch(
|
||||
"homeassistant.runner.packaging.tags.sys_tags",
|
||||
side_effect=_mock_sys_tags_musl,
|
||||
),
|
||||
):
|
||||
runner._enable_posix_spawn()
|
||||
assert runner.subprocess._USE_POSIX_SPAWN is True
|
||||
assert subprocess._USE_POSIX_SPAWN is True
|
||||
|
||||
with (
|
||||
patch.object(runner.subprocess, "_USE_POSIX_SPAWN", False),
|
||||
patch.object(subprocess, "_USE_POSIX_SPAWN", False),
|
||||
patch(
|
||||
"homeassistant.runner.packaging.tags.sys_tags",
|
||||
side_effect=_mock_sys_tags_any,
|
||||
),
|
||||
):
|
||||
runner._enable_posix_spawn()
|
||||
assert runner.subprocess._USE_POSIX_SPAWN is False
|
||||
assert subprocess._USE_POSIX_SPAWN is False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue