Exemplo n.º 1
0
 def test_re_findall(self):
     assert re.findall(":+", "abc") == []
     assert re.findall(":+", "a:b::c:::d") == [":", "::", ":::"]
     assert re.findall("(:+)", "a:b::c:::d") == [":", "::", ":::"]
     assert re.findall("(:)(:*)", "a:b::c:::d") == [(":", ""),
                                                            (":", ":"),
                                                            (":", "::")]
Exemplo n.º 2
0
 def test_bug_117612(self):
     assert re.findall(r"(a|(b))", "aba") == (
                      [("a", ""),("b", "b"),("a", "")])
Exemplo n.º 3
0
 def test_bug_117612(self):
     assert re.findall(r"(a|(b))", "aba") == ([("a", ""), ("b", "b"),
                                               ("a", "")])
Exemplo n.º 4
0
 def test_re_findall(self):
     assert re.findall(":+", "abc") == []
     assert re.findall(":+", "a:b::c:::d") == [":", "::", ":::"]
     assert re.findall("(:+)", "a:b::c:::d") == [":", "::", ":::"]
     assert re.findall("(:)(:*)", "a:b::c:::d") == [(":", ""), (":", ":"),
                                                    (":", "::")]