mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
capitalization: Make it easier to ignore phrases.
This commit allows us to add the errors shown by the tools/check-capitalization in the IGNORED_PHRASES list without any modification.
This commit is contained in:
@@ -132,12 +132,22 @@ class CheckCapitalizationTestCase(TestCase):
|
||||
"Some number 25MiB",
|
||||
"Not Ignored Phrase",
|
||||
"Not ignored phrase",
|
||||
('<p class="bot-settings-note padded-container"> Looking for our '
|
||||
'<a href="/integrations" target="_blank">Integrations</a> or '
|
||||
'<a href="{{ server_uri }}/api" target="_blank">API</a> '
|
||||
'documentation? </p>'),
|
||||
]
|
||||
errored, ignored = check_capitalization(strings)
|
||||
self.assertEqual(errored, ['Not Ignored Phrase'])
|
||||
self.assertEqual(ignored, sorted(["Zulip Zulip. Zulip some text!",
|
||||
"Zulip Zulip? Zulip some text!",
|
||||
"Zulip Zulip! Zulip some text!",
|
||||
"Zulip Zulip, Zulip some text!",
|
||||
"Some number 25MiB",
|
||||
]))
|
||||
self.assertEqual(
|
||||
ignored,
|
||||
sorted(["Zulip Zulip. Zulip some text!",
|
||||
"Zulip Zulip? Zulip some text!",
|
||||
"Zulip Zulip! Zulip some text!",
|
||||
"Zulip Zulip, Zulip some text!",
|
||||
"Some number 25MiB",
|
||||
('<p class="bot-settings-note padded-container"> Looking '
|
||||
'for our <a href="/integrations" target="_blank">'
|
||||
'Integrations</a> or <a href="{{ server_uri }}/api" '
|
||||
'target="_blank">API</a> documentation? </p>'),
|
||||
]))
|
||||
|
||||
Reference in New Issue
Block a user