Ejemplo n.º 1
0
def test_double_negation_elimination_note():
    assert double_negation_elimination(
        "not B or not note and D") == "not B or not note and D"
Ejemplo n.º 2
0
def test_double_negation_elimination_keep_colon():
    assert double_negation_elimination(
        "type:not not (A or B)") == "type:(A or B)"
Ejemplo n.º 3
0
def test_double_negation_elimination_after_or_gate():
    assert double_negation_elimination("not B or not not D") == "not B or D"
Ejemplo n.º 4
0
def test_double_negation_elimination_gates_between():
    assert double_negation_elimination(
        "not type and all between or not (A & B)"
    ) == "not type and all between or not (A & B)"
Ejemplo n.º 5
0
def test_double_negation_elimination_word_between():
    assert double_negation_elimination(
        "not type:not (A & B)") == "type:(A & B)"
Ejemplo n.º 6
0
def test_double_negation_elimination_multiple():
    assert double_negation_elimination(
        "not not not not not (A and B)") == "not (A and B)"
    assert double_negation_elimination(
        "(not not not A and not not not not B)") == "(not A and B)"
Ejemplo n.º 7
0
def test_double_negation_elimination():
    assert double_negation_elimination("not not (A and B)") == "(A and B)"