jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/653391 )
Change subject: [tests] Fix test_logentry_title_old due to MW 1.19 deprecation warning ......................................................................
[tests] Fix test_logentry_title_old due to MW 1.19 deprecation warning
fix testDeprecatedMethods.test_logentry_title_old due to MW 1.19 deprecation warning
- set _do_test_warning_filename to False and ignore assertDeprecationFile test. - use assertDeprecation() test because there are multiple warnings - reset messages finally
Bug: T271044 Change-Id: I3e269e67d7acd9f55d991cf7734ecb64122570dd --- M tests/logentries_tests.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/logentries_tests.py b/tests/logentries_tests.py index 3f685af..e28bcb3 100644 --- a/tests/logentries_tests.py +++ b/tests/logentries_tests.py @@ -307,14 +307,15 @@ """Test title and page return the same instance.""" # Request multiple log entries in the hope that one might have no # title entry + self._do_test_warning_filename = False # T271044 for logentry in self.site.logevents(total=5): if 'title' in logentry.data: # title may be missing self.assertIsInstance(logentry.title(), pywikibot.Page) self.assertIs(logentry.title(), logentry.page()) - self.assertOneDeprecation(count=2) else: self.assertRaises(KeyError, logentry.title) - self.assertOneDeprecation() + self.assertDeprecation() # T271044 + self._reset_messages() # T271044
def test_get_moved_target(self, key): """Test getMovedTarget method."""
pywikibot-commits@lists.wikimedia.org