jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/482405 )
Change subject: [tests] Provide additional tests for eventstreams_tests.py ......................................................................
[tests] Provide additional tests for eventstreams_tests.py
Change-Id: I34504d57ebec3709c3cc68aab6e2d3249ebd9c0c --- M tests/eventstreams_tests.py 1 file changed, 11 insertions(+), 1 deletion(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/eventstreams_tests.py b/tests/eventstreams_tests.py index 2c845df..71b6d11 100644 --- a/tests/eventstreams_tests.py +++ b/tests/eventstreams_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for the eventstreams module.""" # -# (C) Pywikibot team, 2017-2018 +# (C) Pywikibot team, 2017-2019 # # Distributed under the terms of the MIT license. # @@ -207,6 +207,16 @@ self.es.register_filter(foo=10) self.assertFalse(self.es.streamfilter(self.data))
+ def test_filter_sequence_false(self): + """Test EventStreams filter with assignment of a sequence.""" + self.es.register_filter(bar=list('baz')) + self.assertFalse(self.es.streamfilter(self.data)) + + def test_filter_sequence_true(self): + """Test EventStreams filter with assignment of a sequence.""" + self.es.register_filter(bar=('foo', 'bar', 'baz')) + self.assertTrue(self.es.streamfilter(self.data)) + def test_filter_multiple(self): """Test EventStreams filter with multiple arguments.""" self.es.register_filter(foo=False, bar='baz')
pywikibot-commits@lists.wikimedia.org