Exemplo n.º 1
0
 def test_fullmatch_assertion(self):
     r = get_code(r"(?=a).b")
     assert fullmatch(r, "ab")
     r = get_code(r"(?!a)..")
     assert not fullmatch(r, "ab")
Exemplo n.º 2
0
 def test_fullmatch_2(self):
     r = get_code(r"a(b*?)")
     match = fullmatch(r, "abbb")
     assert match.group(1) == "bbb"
     assert not fullmatch(r, "abbbc")
Exemplo n.º 3
0
 def test_fullmatch_4(self):
     r = get_code(r"a((bp)*)c")
     match = fullmatch(r, "abpbpbpc")
     assert match.group(1) == "bpbpbp"
Exemplo n.º 4
0
 def test_fullmatch_1(self):
     r = get_code(r"ab*c")
     assert not fullmatch(r, "abbbcdef")
     assert fullmatch(r, "abbbc")