예제 #1
0
def test_indentifier_searcher(line):
    """
    let's hope this doesn't match on let blocks, lol
    """
    identifier = "splitter"
    match = seeker._id_regex_from(identifier)(line)
    assert bool(match) is True
예제 #2
0
def test_regarding_my_current_gripe_none_should_match(line):
    """
    let's hope this doesn't match on let blocks, lol
    """
    identifier = "Index"
    match = seeker._id_regex_from(identifier)(line)
    assert bool(match) is False
예제 #3
0
def test_non_matches_dont_match(line):
    """
    had a bad regex that was overmatching, so test that some things
    do not match
    """
    identifier = "wowgoats"
    match = seeker._id_regex_from(identifier)(line)
    assert bool(match) is False
예제 #4
0
def test_type_proper_format():
    """
    technically, types look like this:

        type Donkey
          = Mule
          | Horse
          | Goat

    not like this:

        type Donkey =
            Mule
          | Horse
          | Goat

    and so it should just match it wihtout the equals sign
    """
    line = 'type Donkey'
    identifier = "Donkey"
    match = seeker._id_regex_from(identifier)(line)
    assert bool(match) is True
예제 #5
0
def test_type_matches():
    line = 'type Index doc = Model.Index doc'
    identifier = "Index"
    match = seeker._id_regex_from(identifier)(line)
    assert bool(match) is True