def console(): hash_table = HashTable() while True: op = input(prompts['operations']) if op == '1': word = input(prompts['word']) hash_table.add(word) print(hash_table) elif op == '4': return
def test_repr(): table = HashTable() assert (table) table.add('qwe')
def test_add(): table = HashTable() assert ('qwe' not in table) table.add('qwe') assert ('qwe' in table)
def test_remove(): table = HashTable() table.add('qwe') assert ('qwe' in table) table.remove('qwe') assert ('qwe' not in table)