JonOfScience / etym_tree_python

A python project designed to allow input, display, and tracking of the vocabulary of a constructed language.
0 stars 0 forks source link

8.3.1 A Word can be linked to its parent(s) #79

Closed JonOfScience closed 1 year ago

JonOfScience commented 1 year ago

Parent User Story: #78

GIVEN a Word with entries for "Translated Word Components" AND the entries relate to other extant Words

WHEN a retrieve parents method is called

THEN the parent objects are returned

Examples:

Tasks:

JonOfScience commented 1 year ago

Method created: def get_parents_of_word(self, word: Word) -> Sequence[Word]:

JonOfScience commented 1 year ago

Tests Created in test_lexicon.py

Test Class:

class TestRetrievingWordParentsShould:

Tests:

def test__return_an_empty_list_for_a_root_word(self):
...

def test__return_all_parents_if_all_are_extant(self):
...

def test__return_only_extant_parents_if_some_have_no_entry(self):
...