jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/490081 )
Change subject: [tests] Suppress warnings in api_tests.TestParamInfo ......................................................................
[tests] Suppress warnings in api_tests.TestParamInfo
Change-Id: I18d9beac8003f2631df9976e6bf3f87139f0cbf0 --- M tests/api_tests.py 1 file changed, 8 insertions(+), 7 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/api_tests.py b/tests/api_tests.py index e1f9d2c..38302ae 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """API test module.""" # -# (C) Pywikibot team, 2007-2018 +# (C) Pywikibot team, 2007-2019 # # Distributed under the terms of the MIT license. # @@ -405,8 +405,9 @@ site = self.get_site() pi = api.ParamInfo(site) with suppress_warnings( - r'pywikibot.data.api.ParamInfo.modules is deprecated; ' - r'use submodules() or module_paths instead.', DeprecationWarning + r'pywikibot.data.api.ParamInfo.modules is deprecated for ' + r'[\w ]+; use submodules() or module_paths instead.', + DeprecationWarning ): self.assertIn('revisions', pi.modules) self.assertIn('help', pi.modules) @@ -428,10 +429,10 @@ site = self.get_site() pi = api.ParamInfo(site) with suppress_warnings( - r'pywikibot.data.api.ParamInfo.prefixes is deprecated; ' - r'|pywikibot.data.api.ParamInfo.module_attribute_map is deprecated' - r'|pywikibot.data.api.ParamInfo.modules is deprecated', - DeprecationWarning, + r'pywikibot.data.api.ParamInfo.' + r'(?:prefixes|module_attribute_map|modules) ' + r'is deprecated for [\w ]+; ', + DeprecationWarning ): self.assertIn('revisions', pi.prefixes) self.assertIn('login', pi.prefixes)
pywikibot-commits@lists.wikimedia.org