Exemple #1
0
 def test_group_exactly(self):
     assert Regene("a(bc){2}").simple() == "abcbc"
Exemple #2
0
 def test_group_value_or_more(self):
     assert Regene("(abc){3,}").simple() == "abcabcabc"
Exemple #3
0
 def test_value_or_less(self):
     assert Regene("[a]").simple() == "a"
Exemple #4
0
 def test_plus(self):
     assert Regene("ab+").simple() == "ab"
Exemple #5
0
 def test_between(self):
     assert Regene("[b-z]{4,5}a").simple() == "bbbba"
Exemple #6
0
 def test_value_or_more(self):
     assert Regene("a[b]{1,}").simple() == "ab"
Exemple #7
0
 def test_quantifier_in_middle_of_string(self):
     assert Regene("ab{2}c").simple() == "abbc"
Exemple #8
0
 def test_question_mark(self):
     assert Regene("[ab]?").simple() == ""
Exemple #9
0
 def test_multiple_quantifiers(self):
     assert Regene("(ab)+(cd)+").simple() == "abcd"
Exemple #10
0
 def test_different_kinds_of_quantifiers_in_one_expression(self):
     assert Regene("ab?cd+c+").simple() == "acdc"
Exemple #11
0
 def test_exactly(self):
     assert Regene("abc{2}").simple() == "abcc"
Exemple #12
0
 def test_between(self):
     assert Regene("a{4,5}b").simple() == "aaaab"
Exemple #13
0
 def test_star(self):
     assert Regene("ab*c").simple() == "ac"
Exemple #14
0
 def test_group_value_or_less(self):
     assert Regene("a(b){,6}").simple() == "a"
Exemple #15
0
 def test_group_plus(self):
     assert Regene("(ab)+").simple() == "ab"
Exemple #16
0
 def test_plus(self):
     assert Regene("[ab]+").simple() == "a"
Exemple #17
0
 def test_group_question_mark(self):
     assert Regene("(ab)?").simple() == ""
Exemple #18
0
 def test_star(self):
     assert Regene("[ab]*c").simple() == "c"
Exemple #19
0
 def test_group_star(self):
     assert Regene("(ab)*c").simple() == "c"
Exemple #20
0
 def test_exactly(self):
     assert Regene("[abc]{2}").simple() == "aa"
Exemple #21
0
 def test_group_between(self):
     assert Regene("(ab){4,5}").simple() == "abababab"
Exemple #22
0
 def test_multiple_characters(self):
     assert Regene("abc").simple() == "abc"
Exemple #23
0
 def test_single_character(self):
     assert Regene("a").simple() == "a"
Exemple #24
0
 def test_set_in_start_of_string(self):
     assert Regene("[a]bcc").simple() == "abcc"
Exemple #25
0
 def test_empty_string(self):
     assert Regene("").simple() == ""