コード例 #1
0
ファイル: test_something_lol.py プロジェクト: cpdean/seeker
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
ファイル: test_something_lol.py プロジェクト: cpdean/seeker
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
ファイル: test_something_lol.py プロジェクト: cpdean/seeker
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
ファイル: test_something_lol.py プロジェクト: cpdean/seeker
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
ファイル: test_something_lol.py プロジェクト: cpdean/seeker
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