Пример #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)
Пример #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
Пример #3
0
 def show(message, category, filename, lineno, file=None, line=None):
     with assert_raises_regex(EncodingWarning,
                              '.* invalid continuation byte'):
         raise message
Пример #4
0
 def show(message, category, filename, lineno, file=None, line=None):
     with assert_raises_regex(EncodingWarning, '.*control character.*'):
         raise message
Пример #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)