def test_get_regex_for_reference_star_in_mid(ref): expr = get_regex_for_reference('Left*Layer') assert expr.match(ref) assert not expr.match('something' + ref) assert not expr.match(ref + 'something')
def test_get_regex_for_reference_star_at_end(ref): expr = get_regex_for_reference('layer*') assert expr.match(ref) assert not expr.match('something' + ref)
def test_get_regex_for_reference_star_at_beginning(ref): expr = get_regex_for_reference('*12') assert expr.match(ref) assert not expr.match(ref + 'something')
def test_get_regex_for_reference_non_starred(ref): expr = get_regex_for_reference(ref) assert expr.match(ref)