Skip to content

Commit

Permalink
subtrie add test replace handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Florimond committed Aug 3, 2019
1 parent 22dbbfb commit 5c965e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions emitter/subtrie_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ def test_lookup_with_wildcard():
results = t.lookup(k)
assert len(results) == v

def test_replace_handler():
t = SubTrie()
t.insert("a", lambda: "a1")
t.insert("a", lambda: "a2")

results = t.lookup("a")
assert len(results) == 1
assert results[0]() == "a2"

def test_delete_parent():
t = SubTrie()
Expand Down

0 comments on commit 5c965e0

Please sign in to comment.