def test_hydra_add_multiple_entries_to_same_hydra(): words = ['every', 'good', 'boy', 'does', 'fine', 'everything'] hh = Hydra(words) for idx, word in enumerate(words): hh.insert_word(word, idx) hh.insert_word(word, idx*2) assert hh.lookup(word) == set([idx, idx*2])
def test_negative_hydra_lookup_a_word_that_is_not_in_hydra(): hh = Hydra([]) hh.insert_word('someword', 'marker') assert hh.lookup('anotherword') == None