From 06066e0f520920f9429c8ea88d3a6a2b5ce3f8fb Mon Sep 17 00:00:00 2001 From: petr-tik Date: Sat, 10 Feb 2018 00:27:27 +0000 Subject: [PATCH] Added test and corrected readme --- Readme.md | 2 +- test.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index eb4b0f3..6c6320c 100644 --- a/Readme.md +++ b/Readme.md @@ -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 diff --git a/test.py b/test.py index 5df6308..ace0350 100755 --- a/test.py +++ b/test.py @@ -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