Sample:
>>> from pywikibot.comms.eventstreams import EventStreams >>> stream = EventStreams(stream='recentchange') >>> stream.register_filter(foo=True, bar='baz') >>> f, g = stream.filter['all'] >>> c = {'foo': True} >>> f(c), g(c) (False, False) >>> c = {'bar': 'baz'} >>> f(c), g(c) (True, True) >>> del streams
Expected result:
>>> f(c), g(c) (True, False) >>> c = {'bar': 'baz'} >>> f(c), g(c) (False, True) >>>
whereas registering in single arguments works:
>>> stream = EventStreams(stream='recentchange') >>> stream.register_filter(foo=True) >>> stream.register_filter(bar='baz') >>> f, g = stream.filter['all'] >>> c = {'foo': True} >>> f(c), g(c) (True, False) >>> c = {'bar': 'baz'} >>> f(c), g(c) (False, True) >>>