Skip to content

Commit

Permalink
Added test and corrected readme
Browse files Browse the repository at this point in the history
  • Loading branch information
petr-tik committed Feb 10, 2018
1 parent 2d67280 commit 06066e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Average duration of looking for same 50 words that aren't in the trie

## Results

Published in a blog and delivered as a presentation.
TODO: Published in a blog and delivered as a presentation.

## Conclusion

Expand Down
10 changes: 10 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,13 @@ def test_find_missing_letters_exist_after(constructor):
def test_find_missing_before_add(constructor):
tr = constructor()
assert tr.find("me") == 0


@pytest.mark.parametrize("constructor", constructors)
def test_add_many_find_missing(constructor):
tr = constructor()
tr.add("bob")
tr.add("boban")
assert tr.find("me") == 0
tr.add("alice")
assert tr.find("alice") == 1

0 comments on commit 06066e0

Please sign in to comment.