mirror of
https://github.com/home-assistant/core.git
synced 2025-12-26 14:08:21 +00:00
Remove workaround for flaky translation tests (#131628)
This commit is contained in:
@@ -1192,7 +1192,12 @@ def mock_get_source_ip() -> Generator[_patch]:
|
||||
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def translations_once() -> Generator[_patch]:
|
||||
"""Only load translations once per session."""
|
||||
"""Only load translations once per session.
|
||||
|
||||
Warning: having this as a session fixture can cause issues with tests that
|
||||
create mock integrations, overriding the real integration translations
|
||||
with empty ones. Translations should be reset after such tests (see #131628)
|
||||
"""
|
||||
cache = _TranslationsCacheData({}, {})
|
||||
patcher = patch(
|
||||
"homeassistant.helpers.translation._TranslationsCacheData",
|
||||
|
||||
Reference in New Issue
Block a user