jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] DequeGenerator tests: always add talk page ......................................................................
[FIX] DequeGenerator tests: always add talk page
The tests for wikidata and wiktionary fail because their main pages are not in the main namespace.
Change-Id: I46c4e507f0839023fe355161bb299e74c42c5367 --- M tests/pagegenerators_tests.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index dd85f1b..96e5dfa 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -173,14 +173,14 @@ for page in gen: pages_out.append(page) # Add a page to the generator - if page.namespace() == 0: + if not page.isTalkPage(): pages.extend([page.toggleTalkPage()])
self.assertTrue(all(isinstance(page, pywikibot.Page) for page in pages_out)) - self.assertEqual(len(pages_out), 2) - self.assertEqual(pages_out[1].namespace(), 1) self.assertIn(mainpage, pages_out) self.assertIn(mainpage.toggleTalkPage(), pages_out) + self.assertEqual(len(pages_out), 2) + self.assertTrue(pages_out[1].isTalkPage())
class TestPreloadingItemGenerator(WikidataTestCase):
pywikibot-commits@lists.wikimedia.org