jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1341226?usp=email )
Change subject: tests: Include test codes when checking MediaWiki messages
......................................................................
tests: Include test codes when checking MediaWiki messages
Beta families keep their sites in test_codes and have no ordinary
codes. Include both collections when selecting message languages so
test_messages does not index an empty list on betawikisource:en.
Retain the existing assertions for single-language families.
Change-Id: I633dd8ebea1c5f373116c79dd177f026a8374a13
---
M tests/site_tests.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Mahveotm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py
index fd864e3..89ce296 100755
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -177,7 +177,10 @@
months = ['january', 'february', 'march', 'april', 'may_long',
'june', 'july', 'august', 'september', 'october',
'november', 'december']
- codes = sorted(mysite.family.codes)
+ codes = sorted(
+ set(mysite.family.codes)
+ | set(getattr(mysite.family, 'test_codes', ()))
+ )
lang1, lang2 = codes[0], codes[-1]
with self.subTest(messages='months', lang1=lang1, lang2=lang2):
self.assertLength(mysite.mediawiki_messages(months, lang1), 12)
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1341226?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: I633dd8ebea1c5f373116c79dd177f026a8374a13
Gerrit-Change-Number: 1341226
Gerrit-PatchSet: 1
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Mahveotm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]