jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1073782?usp=email )

Change subject: [tests] Fix CI tests
......................................................................

[tests] Fix CI tests

- update doctest for main_authors()
- ignore sequence in TestFactoryGeneratorWikibase.test_searchitem_language

Bug: T375093
Bug: T375108
Change-Id: Id07d4693b221b9bd62a0e7411148ccbe2b6b382a
---
M pywikibot/page/_toolforge.py
M tests/pagegenerators_tests.py
2 files changed, 6 insertions(+), 8 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py
index 2d64209..047beb6 100644
--- a/pywikibot/page/_toolforge.py
+++ b/pywikibot/page/_toolforge.py
@@ -76,7 +76,7 @@
         >>> page = pywikibot.Page(site, 'Python (informatika)')
         >>> auth = page.main_authors()
         >>> auth.most_common(1)
-        [('Ksarasola', 81)]
+        [('Ksarasola', 82)]

         .. important:: Only implemented for main namespace pages and
            only wikipedias of :attr:`WIKIBLAME_CODES` are supported.
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 350f490..77ed29a 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1518,15 +1518,13 @@
         """Test -searchitem with custom language specified."""
         gf = pagegenerators.GeneratorFactory(site=self.site)
         gf.handle_arg('-searchitem:en:abc')
-        gf.handle_arg('-limit:2')
+        gf.handle_arg('-limit:5')
         gen = gf.getCombinedGenerator()
         self.assertIsNotNone(gen)
-        # American Broadcasting Company
-        page1 = next(gen)
-        self.assertEqual(page1.title(), 'Q169889')
-        # alphabet, also known as ABC
-        page2 = next(gen)
-        self.assertEqual(page2.title(), 'Q9779')
+        result = {page.title() for page in gen}
+        self.assertIn('Q169889', result)  # American Broadcasting Company
+        self.assertIn('Q9779', result)  # alphabet, also known as ABC
+        self.assertIn('Q1057802', result)  # ABC programming language

     def test_get_category_site(self):
         """Test the getCategory method."""

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1073782?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id07d4693b221b9bd62a0e7411148ccbe2b6b382a
Gerrit-Change-Number: 1073782
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to