def test_one_character(self): h, t = Trie.parse_key('a') assert h == 'a' assert t == ''
def test_accepts_strings_only(self): try: h, t = Trie.parse_key(5) assert False, 'Expected error for non-string key' except TypeError: pass
def test_empty_string(self): h, t = Trie.parse_key('') assert h == '' assert t == ''