Remove assert_lists_same test helper (#94904)

This commit is contained in:
Erik Montnemery 2023-06-21 12:10:28 +02:00 committed by GitHub
parent 05039036f1
commit 732ce34a66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 20 deletions

View file

@ -1373,19 +1373,6 @@ def async_mock_signal(hass: HomeAssistant, signal: str) -> list[tuple[Any]]:
return calls
def assert_lists_same(a: list[Any], b: list[Any]) -> None:
"""Compare two lists, ignoring order.
Check both that all items in a are in b and that all items in b are in a,
otherwise assert_lists_same(["1", "1"], ["1", "2"]) could be True.
"""
assert len(a) == len(b)
for i in a:
assert i in b
for i in b:
assert i in a
_SENTINEL = object()