jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/516194 )

Change subject: [tests] Suppress deprecation warning for languages_by_size at 
wowwiki
......................................................................

[tests] Suppress deprecation warning for languages_by_size at wowwiki

Change-Id: I50b562c851c30d0cbc0916f6023794f28d61577f
---
M tests/family_tests.py
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/tests/family_tests.py b/tests/family_tests.py
index 0d4c70f..d33c2a8 100644
--- a/tests/family_tests.py
+++ b/tests/family_tests.py
@@ -11,7 +11,7 @@

 from pywikibot.exceptions import UnknownFamily
 from pywikibot.family import Family, SingleSiteFamily
-from pywikibot.tools import StringTypes as basestring
+from pywikibot.tools import StringTypes as basestring, suppress_warnings

 from tests.aspects import (
     unittest,
@@ -50,8 +50,12 @@
                 if domain.split(':', 1)[0] != 'localhost':
                     self.assertIn('.', domain)
             self.assertEqual(f.name, name)
-            self.assertIsInstance(f.languages_by_size, list)
-            self.assertGreaterEqual(set(f.langs), set(f.languages_by_size))
+
+            with suppress_warnings(
+                    'wowwiki_family.Family.languages_by_size is deprecated'):
+                self.assertIsInstance(f.languages_by_size, list)
+                self.assertGreaterEqual(set(f.langs), set(f.languages_by_size))
+
             if isinstance(f, SingleSiteFamily):
                 self.assertIsNotNone(f.code)
                 self.assertIsNotNone(f.domain)

--
To view, visit https://gerrit.wikimedia.org/r/516194
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I50b562c851c30d0cbc0916f6023794f28d61577f
Gerrit-Change-Number: 516194
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: Framawiki <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Lokal Profil <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to