diff --git a/ety/word.py b/ety/word.py index ac745b6..d886ff5 100644 --- a/ety/word.py +++ b/ety/word.py @@ -21,8 +21,7 @@ def __init__(self, word, language='eng', is_source=False): 'direct': [], 'recursive': [] } - self._id = u"{}:{}".format( - self.word.lower(), self.language.iso.lower()) + self._id = u"{}:{}".format(self.word, self.language.iso) def origins(self, recursive=False): search = 'recursive' if recursive else 'direct' @@ -33,10 +32,8 @@ def origins(self, recursive=False): return o row = list(filter( - lambda entry: ( - entry['a_word'].lower() == self.word.lower() - and entry['a_lang'].lower() == self.language.iso.lower()), - etymwn_data)) + lambda entry: entry['a_word'] == self.word and entry[ + 'a_lang'] == self.language.iso, etymwn_data)) o = [Word(item['b_word'], item['b_lang']) for item in row] diff --git a/tests.py b/tests.py index ec9b1fd..956ce8e 100644 --- a/tests.py +++ b/tests.py @@ -98,18 +98,6 @@ def test_census_origins(self): self.assertEqual(d.origins(recursive=True), e + f) - def test_origins_allows_any_case(self): - wonky_word_origins = ety.origins("tEsT") - lower_word_origins = ety.origins("test") - - self.assertEqual(wonky_word_origins, lower_word_origins) - - def test_tree_allows_any_case(self): - wonky_word_tree = [node.data for node in ety.tree("tEsT").all_nodes()] - lower_word_tree = [node.data for node in ety.tree("test").all_nodes()] - - self.assertEqual(wonky_word_tree, lower_word_tree) - @stdout_capture def test_cli_no_args(self, output): words = ["test"]