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.3 A Word modifies its own Ancestor flag if one of its parent(s) has either flag set #81

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 check Word status method is called

THEN the status of the parents is collated AND the status of the Word is modified to reflect this

Examples:

Tasks:

JonOfScience commented 1 year ago

Added method for resolving flags on a single pass through the Lexicon.

def resolve_modification_flags(self):
        """Loops through all entries checking for status flag changes"""
JonOfScience commented 1 year ago

Tests case decision tables ('Implemented in test_lexicon.py)

def test__return_one_change_for_a_word_with_no_parents(self):
Parents Parent Status Flipped Flags
None N/A 1 (None to False)
def test__returns_changes_for_two_connected_entries(self):
Parents Modified Ancestor Flipped Flags
One None None 2
One False False 1
One True None 2
One True False 1
One None True 2
One False True 2
One True True 2