예제 #1
0
def test_not_matching():
    """Check if not_matching returns those element that are not described by characteristic."""
    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.not_matching('test') == {element1, element2}, "both elements should be returned."
예제 #2
0
def test_not_matching():
    """Check if not_matching returns those element that are not described by characteristic."""
    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.not_matching("test") == {element1, element2}, "both elements should be returned."