Esempio n. 1
0
 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)
Esempio n. 2
0
 def show(message, category, filename, lineno, file=None, line=None):
     with assert_raises_regex(NotOverriddenWarning,
                              r'^.*\bB.f[(][)] is not overridden$'):
         raise message
Esempio n. 3
0
 def show(message, category, filename, lineno, file=None, line=None):
     with assert_raises_regex(EncodingWarning,
                              '.* invalid continuation byte'):
         raise message
Esempio n. 4
0
 def show(message, category, filename, lineno, file=None, line=None):
     with assert_raises_regex(EncodingWarning, '.*control character.*'):
         raise message
Esempio n. 5
0
 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)