Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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