jenkins-bot merged this change.
[tests] Additional pagegenerators tests
Change-Id: I97e4b49074535543e7764986f7608070dbcdfa70
---
M tests/pagegenerators_tests.py
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index b1bf150..dd45dac 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -798,6 +798,20 @@
"""Test pagegenerators.GeneratorFactory."""
+ def test_combined_generator(self):
+ """Test getCombinedGenerator with generator parameter."""
+ gf = pagegenerators.GeneratorFactory()
+ gen = gf.getCombinedGenerator(gen='ABC')
+ self.assertEqual(tuple(gen), ('A', 'B', 'C'))
+
+ def test_intersect_generator(self):
+ """Test getCombinedGenerator with generator parameter."""
+ gf = pagegenerators.GeneratorFactory()
+ gf.handleArg('-intersect')
+ gf.gens = ['Python 3.7-dev']
+ gen = gf.getCombinedGenerator(gen='Pywikibot 3.0.dev')
+ self.assertEqual(''.join(gen), 'Pyot 3.dev')
+
def test_ns(self):
"""Test namespace option."""
gf = pagegenerators.GeneratorFactory()
To view, visit change 433592. To unsubscribe, or for help writing mail filters, visit settings.