Beispiel #1
0
 def convert_pattern(self, input_str: str) -> str:
     return convert2fuzzy_pattern(input_str)
Beispiel #2
0
 def convert_pattern(self, input_str):
     p = convert2fuzzy_pattern(input_str)
     # self.debug("pattern: %s : %s" % (input_str, p))
     return p
Beispiel #3
0
def test_convert2fuzzy_pattern():
    assert util.convert2fuzzy_pattern('abc') == 'a[^a]*b[^b]*c'
    assert util.convert2fuzzy_pattern('a/c') == 'a[^a]*/[^/]*c'
def test_convert2fuzzy_pattern():
    assert util.convert2fuzzy_pattern('abc') == 'a[^a]*b[^b]*c'
    assert util.convert2fuzzy_pattern('a/c') == 'a[^a]*/[^/]*c'
Beispiel #5
0
 def convert_pattern(self, input_str):
     return convert2fuzzy_pattern(input_str)
Beispiel #6
0
def test_convert2fuzzy_pattern():
    assert util.convert2fuzzy_pattern('abc') == 'a.{-}b.{-}c'
    assert util.convert2fuzzy_pattern('a/c') == 'a.{-}/[^/]*c'
Beispiel #7
0
 def test_convert2fuzzy_pattern(self):
     eq_(convert2fuzzy_pattern('abc'), 'a[^a]*b[^b]*c')
     eq_(convert2fuzzy_pattern('a/c'), 'a[^a]*/[^/]*c')
Beispiel #8
0
 def test_convert2fuzzy_pattern(self):
     eq_(convert2fuzzy_pattern('abc'), 'a[^a]*b[^b]*c[^c]*')
Beispiel #9
0
def test_convert2fuzzy_pattern():
    assert util.convert2fuzzy_pattern('abc') == 'a[^a \t]{-}b[^b \t]{-}c'
    assert util.convert2fuzzy_pattern('a/c') == 'a[^a \t]{-}/[^/]*c'
Beispiel #10
0
 def test_convert2fuzzy_pattern(self):
     eq_(convert2fuzzy_pattern('abc'), 'a[^a]*b[^b]*c')
     eq_(convert2fuzzy_pattern('a/c'), 'a[^a]*/[^/]*c')