From 7619bfa9adc7f01d11c4f4e734125eecb779d299 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Dec 2024 15:10:24 +1000 Subject: [PATCH] test: switch a bool([...]) to any() Part-of: --- test/test_protocol.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test_protocol.py b/test/test_protocol.py index deaaf50..38c28ea 100644 --- a/test/test_protocol.py +++ b/test/test_protocol.py @@ -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"