Пример #1
0
 def test_start(self):
     #basicConfig(level=DEBUG)
     match = DfaRegexp('(*SOL)a*')
     match.config.default_line_aware().no_full_first_match()
     result = list(match.match_string('abc'))[0][0]
     assert result == ['a'], result
Пример #2
0
 def test_start(self):
     #basicConfig(level=DEBUG)
     match = DfaRegexp('(*SOL)a*')
     match.config.default_line_aware().no_full_first_match()
     result = list(match.match_string('abc'))[0][0]
     assert result == ['a'], result
Пример #3
0
 def test_invert_bug_1(self):
     #basicConfig(level=DEBUG)
     match = DfaRegexp('(*SOL)[^c]*')
     match.config.default_line_aware().trace(True).no_full_first_match()
     result = list(match.match_string('abc'))[0][0]
     assert result == ['ab'], result
Пример #4
0
 def test_invert_bug_1(self):
     #basicConfig(level=DEBUG)
     match = DfaRegexp('(*SOL)[^c]*')
     match.config.default_line_aware().trace(True).no_full_first_match()
     result = list(match.match_string('abc'))[0][0]
     assert result == ['ab'], result