Avoid ffmpeg subprocess for many component tests (#105354)

This commit is contained in:
J. Nick Koston 2023-12-09 08:41:37 -10:00 committed by GitHub
parent c96a588934
commit a0bf170fb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,3 +91,12 @@ def tts_mutagen_mock_fixture():
from tests.components.tts.common import tts_mutagen_mock_fixture_helper
yield from tts_mutagen_mock_fixture_helper()
@pytest.fixture(scope="session", autouse=True)
def prevent_ffmpeg_subprocess() -> Generator[None, None, None]:
"""Prevent ffmpeg from creating a subprocess."""
with patch(
"homeassistant.components.ffmpeg.FFVersion.get_version", return_value="6.0"
):
yield