def test_wildcard_matches_with_wildcard():
    type_rule = TypeRule(['int', '+', '?'], 'int')

    assert type_rule._wildcard_matches(['int', '+', 'int'])
def test_wildcard_matches_with_wildcard_bad_structure():
    type_rule = TypeRule(['int', '-', '?'], 'int')

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

    assert not result