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):
--
To view, visit
https://gerrit.wikimedia.org/r/342172
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1a2445f907557aca76c505e74095d881c50069f
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>