jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/433592 )
Change subject: [tests] Additional pagegenerators tests ......................................................................
[tests] Additional pagegenerators tests
Change-Id: I97e4b49074535543e7764986f7608070dbcdfa70 --- M tests/pagegenerators_tests.py 1 file changed, 14 insertions(+), 0 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
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()
pywikibot-commits@lists.wikimedia.org