test: switch a bool([...]) to any()

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/317>
This commit is contained in:
Peter Hutterer 2024-12-06 15:10:24 +10:00
parent c169ac63b8
commit 7619bfa9ad

View file

@ -528,9 +528,7 @@ class TestEiProtocol:
except (ConnectionResetError, BrokenPipeError):
pass
ei.wait_for(
lambda: bool([c for c in connection.calllog if c.name == "Disconnected"])
)
ei.wait_for(lambda: any(c.name == "Disconnect" for c in connection.calllog))
for call in connection.calllog:
assert call.name != "Disconnected", "No disconnect event allowed here"