def _test_has_language(self, lang, ok): if ok: self.engine.check_language(lang) else: with assert_raises_regex( lib.errors.MissingLanguagePack, '^language pack for the selected language (.+) is not available$' ): self.engine.check_language(lang)
def show(message, category, filename, lineno, file=None, line=None): with assert_raises_regex(NotOverriddenWarning, r'^.*\bB.f[(][)] is not overridden$'): raise message
def show(message, category, filename, lineno, file=None, line=None): with assert_raises_regex(EncodingWarning, '.* invalid continuation byte'): raise message
def show(message, category, filename, lineno, file=None, line=None): with assert_raises_regex(EncodingWarning, '.*control character.*'): raise message
def _test_has_language(self, lang, ok): if ok: self.engine.check_language(lang) else: with assert_raises_regex(lib.errors.MissingLanguagePack, '^language pack for the selected language (.+) is not available$'): self.engine.check_language(lang)