From 093ccad5d2d3154cbdad498086350f6473b1ba8a Mon Sep 17 00:00:00 2001 From: Xqt Date: Mon, 2 Dec 2024 19:33:15 +0000 Subject: [PATCH] Revert "tests: Skip wikiblame tests due to T381262" This reverts commit f83ab2850b218c743bc7059e352275d89da357eb. Reason for revert: solved upstream Bug: T381262 Change-Id: I74ec5d56f20521751123118133cf6db505790ff5 --- pywikibot/page/_toolforge.py | 12 ++++++------ tests/wikiblame_tests.py | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pywikibot/page/_toolforge.py b/pywikibot/page/_toolforge.py index cfe2f9ebe9..19a2782c67 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() # doctest: +SKIP - >>> auth.most_common(1) # doctest: +SKIP - [('Ksarasola', 82)] # doctest: +SKIP + >>> auth = page.main_authors() + >>> auth.most_common(1) + [('Ksarasola', 82)] .. 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() # doctest: +SKIP - >>> auth # doctest: +SKIP - {'1234qwer1234qwer4': (68, 100.0)} # doctest: +SKIP + >>> auth = page.authorship() + >>> auth + {'1234qwer1234qwer4': (68, 100.0)} .. 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 306cb5d1e8..0d5057caec 100644 --- a/tests/wikiblame_tests.py +++ b/tests/wikiblame_tests.py @@ -36,7 +36,6 @@ 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)') @@ -49,7 +48,6 @@ 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')