Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1312276?usp=email )
Change subject: tests: make test_groupnames more robust
......................................................................
tests: make test_groupnames more robust
the defaultdict class might create a default '' value;
take this into account for the test.
Change-Id: I19a3de797265ec026d0decc7622e2995a25ba6fc
---
M tests/i18n_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py
index 8066b42..cbb9a8e 100755
--- a/tests/i18n_tests.py
+++ b/tests/i18n_tests.py
@@ -40,6 +40,7 @@
def test_groupnames(self):
"""Test that groupnames are in groups."""
groupnames = set(i18n._LANG_TO_GROUP_NAME.values())
+ groupnames.discard('') # might be created by defaultdict
self.assertLess(groupnames, i18n._LANG_TO_GROUP_NAME.keys())
groups = list(i18n._GROUP_NAME_TO_FALLBACKS)
groups.remove('') # remove empty fallback
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1312276?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I19a3de797265ec026d0decc7622e2995a25ba6fc
Gerrit-Change-Number: 1312276
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]