jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/656440 )

Change subject: [bugfix] Ignore failing test_loadimageinfo for Python 3.5
......................................................................

[bugfix] Ignore failing test_loadimageinfo for Python 3.5

loadimageinfo gives a FutureWarning if a result is expected from this
method. Unfortunately it does not work for Python 3.5 and the bot
owner will not be warned. Ignore failing tests with Python 3.5.

Bug: T272157
Change-Id: I5eeb6164e28debeb663242a4f1d658e5182dfd04
---
M tests/site_tests.py
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/tests/site_tests.py b/tests/site_tests.py
index 9a00492..a6a9279 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -18,7 +18,7 @@
 from pywikibot import config
 from pywikibot.data import api
 from pywikibot.exceptions import HiddenKeyError
-from pywikibot.tools import suppress_warnings
+from pywikibot.tools import PYTHON_VERSION, suppress_warnings

 from tests import patch, unittest_print
 from tests.aspects import (
@@ -33,6 +33,7 @@
     WikidataTestCase,
 )
 from tests.basepage import BasePageLoadRevisionsCachingTestBase
+from tests.utils import expected_failure_if


 class TestSiteObjectDeprecatedFunctions(DefaultSiteTestCase,
@@ -107,6 +108,7 @@
         self.assertEqual(self.site.category_namespaces(),
                          list(self.site.namespace(14, all=True)))

+    @expected_failure_if(PYTHON_VERSION < (3, 6))
     def test_loadimageinfo(self):
         """Test deprecation warning if result of loadimageinfo() is used."""
         file = pywikibot.FilePage(self.site, 'foo.jpg')

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5eeb6164e28debeb663242a4f1d658e5182dfd04
Gerrit-Change-Number: 656440
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to