def test_generalize_decrements_specificity(self): # given condition = Condition('#11#####') assert 2 == condition.specificity # when condition.generalize(1) # then assert 1 == condition.specificity
def test_should_generalize(self): # given s = "#1O##O##" cond = Condition(s) # when cond.generalize(position=1) # then assert Condition("##O##O##") == cond