From f83ab2850b218c743bc7059e352275d89da357eb Mon Sep 17 00:00:00 2001 From: xqt Date: Mon, 2 Dec 2024 17:10:44 +0100 Subject: [PATCH] tests: Skip wikiblame tests due to T381262 Bug: T381262 Change-Id: Id2eef3e62f719e662c1dc917b6614a0a27628bbd --- pywikibot/page/_toolforge.py | 12 ++++++------ tests/wikiblame_tests.py | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py index 19a2782c67..cfe2f9ebe9 100644 --- a/pywikibot/page/_toolforge.py +++ b/pywikibot/page/_toolforge.py @@ -74,9 +74,9 @@ def main_authors(self) -> collections.Counter[str, int]: >>> import pywikibot >>> site = pywikibot.Site('wikipedia:eu') >>> page = pywikibot.Page(site, 'Python (informatika)') - >>> auth = page.main_authors() - >>> auth.most_common(1) - [('Ksarasola', 82)] + >>> auth = page.main_authors() # doctest: +SKIP + >>> auth.most_common(1) # doctest: +SKIP + [('Ksarasola', 82)] # doctest: +SKIP .. important:: Only implemented for main namespace pages and only wikipedias of :attr:`WIKIBLAME_CODES` are supported. @@ -126,9 +126,9 @@ def authorship( >>> import pywikibot >>> site = pywikibot.Site('wikipedia:en') >>> page = pywikibot.Page(site, 'Pywikibot') - >>> auth = page.authorship() - >>> auth - {'1234qwer1234qwer4': (68, 100.0)} + >>> auth = page.authorship() # doctest: +SKIP + >>> auth # doctest: +SKIP + {'1234qwer1234qwer4': (68, 100.0)} # doctest: +SKIP .. important:: Only implemented for main namespace pages and only wikipedias of :attr:`WIKIBLAME_CODES` are supported. diff --git a/tests/wikiblame_tests.py b/tests/wikiblame_tests.py index 0d5057caec..306cb5d1e8 100644 --- a/tests/wikiblame_tests.py +++ b/tests/wikiblame_tests.py @@ -36,6 +36,7 @@ def test_exceptions(self): page.authorship() @require_modules('wikitextparser') + @unittest.expectedFailure # T381262 def test_main_authors(self): """Test main_authors() method.""" page = pywikibot.Page(self.site, 'Python (programmeertaal)') @@ -48,6 +49,7 @@ def test_main_authors(self): self.assertIsInstance(values[1], float) @require_modules('wikitextparser') + @unittest.expectedFailure # T381262 def test_restrictions(self): """Test main_authors() method with restrictions.""" page = pywikibot.Page(pywikibot.Site('wikipedia:en'), 'Python')