def test_match(): """Check if match cuts objects properly.""" box = MatchBox('argument') element1 = 'element' element2 = 'element2' totally_other = 'other' box.index['other'].add(totally_other) box.exclude_unknown.add(element1) box.index['test'].add(element2) assert box.match({element1, element2, totally_other}, 'test') == {totally_other}, "only one element should match"
def test_match(): """Check if match cuts objects properly.""" box = MatchBox("argument") element1 = "element" element2 = "element2" totally_other = "other" box.index["other"].add(totally_other) box.exclude_unknown.add(element1) box.index["test"].add(element2) assert box.match({element1, element2, totally_other}, "test") == {totally_other}, "only one element should match"
def test_match(): """Check if match cuts entites properly.""" box = MatchBox('argument') element1 = 'element' element2 = 'element2' totally_other = 'other' box.index['other'].add(totally_other) box.mismatch_unknown.add(element1) box.index['test'].add(element2) all_elements = {element1, element2, totally_other} assert box.match(all_elements, 'test') == {totally_other}, "only one element should match"