コード例 #1
0
ファイル: i18n_lexer.py プロジェクト: jeamland/gherkin
 def lang(self, source):
     key = 'en'
     for line in lazy_split_lines(source):
         if not comment_or_empty_line.match(line):
             break
         match = language_pattern.match(line)
         if match:
             key = match.groups(1)[0]
     return I18n.get(key)
コード例 #2
0
ファイル: test_i18n.py プロジェクト: jeamland/gherkin
 def test_print_available_languages(self):
     assert u"\n" + I18n.language_table() == u"""
コード例 #3
0
ファイル: test_i18n.py プロジェクト: jeamland/gherkin
 def test_report_keyword_regexp(self):
     expected_substring = '|Quando |Quand |Quan |Pryd |Pokud |'
     assert expected_substring in I18n.keyword_regexp('step')
コード例 #4
0
ファイル: test_i18n.py プロジェクト: jeamland/gherkin
 def test_reject_bullet_stars(self):
     assert '*' not in I18n.all_code_keywords()
コード例 #5
0
ファイル: test_i18n.py プロジェクト: jeamland/gherkin
 def test_have_code_keywords_without_punctuation(self):
     code_keywords = (u'Avast', u'Akkor', u'Etantdonné', u'Lorsque', u'假設')
     for code_keyword in code_keywords:
         assert code_keyword in I18n.all_code_keywords()
コード例 #6
0
ファイル: test_i18n.py プロジェクト: jeamland/gherkin
 def test_print_keyword_for_a_given_language(self):
     assert u"\n" + I18n.get('fr').keyword_table() == u"""