From d860b35f41cee9712ec04915ab72862cf22a169e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 28 Apr 2025 09:27:26 +0200 Subject: [PATCH] Fix flaky test test_async_parallel_updates_with_zero_on_sync_update (#143810) --- tests/helpers/test_entity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index 137b2a7e8a7..61396d97359 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -13,6 +13,7 @@ from unittest.mock import MagicMock, PropertyMock, patch from freezegun.api import FrozenDateTimeFactory from propcache.api import cached_property import pytest +from pytest_unordered import unordered from syrupy.assertion import SnapshotAssertion import voluptuous as vol @@ -393,7 +394,7 @@ async def test_async_parallel_updates_with_zero_on_sync_update( await asyncio.sleep(0) assert len(updates) == 2 - assert updates == [1, 2] + assert updates == unordered([1, 2]) finally: test_lock.set() await asyncio.sleep(0)