예제 #1
0
def test_wildcard_matches_with_wildcard():
    type_rule = TypeRule(['int', '+', '?'], 'int')

    assert type_rule._wildcard_matches(['int', '+', 'int'])
예제 #2
0
def test_wildcard_matches_with_wildcard_bad_structure():
    type_rule = TypeRule(['int', '-', '?'], 'int')

    assert not type_rule._wildcard_matches(['int', '+', 'int'])
예제 #3
0
def test_wildcard_matches_no_different_lengths():
    type_rule = TypeRule(['?'], '?')
    result = type_rule._wildcard_matches(['int', '+', 'int'])

    assert not result