Remove assert_lists_same test helper (#94904)
This commit is contained in:
parent
05039036f1
commit
732ce34a66
4 changed files with 7 additions and 20 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue