Update tests to match more combinations
@@ -46,6 +46,16 @@ def test_event_dispatcher():
dispatcher.event_handler(raw_events[4])
assert len(events) == 1, "Matched event=ended and progress=100"
+ events = []
+ dispatcher = EventDispatcher().on(ActivityNotification, lambda x: events.append(x), event=["started"], progress=100)
+ dispatcher.event_handler(raw_events[4])
+ assert len(events) == 0, "Matched event=ended and progress=100"
+
+ events = []
+ dispatcher = EventDispatcher().on(ActivityNotification, lambda x: events.append(x), progress=100, event=["started"])
+ dispatcher.event_handler(raw_events[4])
+ assert len(events) == 0, "Matched progress=100 and event=started"
+
events = []
dispatcher = EventDispatcher().on(ActivityNotification, lambda x: events.append(x), event=["ended"], progress=99)
dispatcher.event_handler(raw_events[4])
