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

Change subject: [fix] fix MissingPackageTestCase.test_cosmetic_changes_hook
......................................................................

[fix] fix MissingPackageTestCase.test_cosmetic_changes_hook

content model of wikidata is 'wikibase-item'

Bug: T276034
Change-Id: I7488868dac4046d8664f60461518fe122b14f564
---
M tests/i18n_tests.py
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py
index 8b6b99a..9a4875a 100644
--- a/tests/i18n_tests.py
+++ b/tests/i18n_tests.py
@@ -547,11 +547,14 @@
         # check cc settings
         config.cosmetic_changes_mylang_only = False
         self.assertFalse(page.isTalkPage())
-        self.assertEqual(page.content_model, 'wikitext')
         self.assertNotIn(pywikibot.calledModuleName(),
                          config.cosmetic_changes_deny_script)
         self.assertFalse(config.cosmetic_changes_mylang_only)

+        if page.content_model != 'wikitext':
+            self.skipTest('Wrong content model {!r} for cosmetic_changes'
+                          .format(page.content_model))
+
         summary = 'Working on Test page at site {}'.format(self.site)
         msg = page._cosmetic_changes_hook(summary)
         self.assertEqual(msg, summary + '; cosmetic changes')

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/667539
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: I7488868dac4046d8664f60461518fe122b14f564
Gerrit-Change-Number: 667539
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[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