jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/342172 )
Change subject: test_allpages_langlinks_enabled: Use project namespace instead of main ......................................................................
test_allpages_langlinks_enabled: Use project namespace instead of main
Pages on the main namespace of wikidata have no language links, therefore the test timeouts there. Use project namespace (4) instead of the main (default) to resolve the issue.
Bug: T160148 Change-Id: Ia1a2445f907557aca76c505e74095d881c50069f --- M tests/site_tests.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/tests/site_tests.py b/tests/site_tests.py index c4f1675..69e967c 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -605,10 +605,11 @@ def test_allpages_langlinks_enabled(self): """Test allpages with langlinks enabled.""" mysite = self.get_site() - for page in mysite.allpages(filterlanglinks=True, total=5): + for page in mysite.allpages( + filterlanglinks=True, total=3, namespace=4): self.assertIsInstance(page, pywikibot.Page) self.assertTrue(mysite.page_exists(page)) - self.assertEqual(page.namespace(), 0) + self.assertEqual(page.namespace(), 4) self.assertNotEqual(page.langlinks(), [])
def test_allpages_langlinks_disabled(self):
pywikibot-commits@lists.wikimedia.org