def test_partialmatch(trie):
    base_key = "abc"
    expected = {f"{base_key}{i:d}": f"value{i:d}" for i in range(3)}
    trie.update(**expected)
    trie[base_key.upper()] = "anything_not_expected"
    result = trie.match(base_key)
    assert result.is_partial_match
    assert dict(result.partial) == expected
def test_nomatch(trie):
    trie["abc"] = "value"
    result = trie.match("abcd")
    assert result.is_no_match
def test_fullmatch(trie):
    key, value = "abc", "value"
    trie[key] = value
    result = trie.match(key)
    assert result.is_full_match
    assert result.value == value