Beispiel #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"
Beispiel #2
0
def test_double_negation_elimination_keep_colon():
    assert double_negation_elimination(
        "type:not not (A or B)") == "type:(A or B)"
Beispiel #3
0
def test_double_negation_elimination_after_or_gate():
    assert double_negation_elimination("not B or not not D") == "not B or D"
Beispiel #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)"
Beispiel #5
0
def test_double_negation_elimination_word_between():
    assert double_negation_elimination(
        "not type:not (A & B)") == "type:(A & B)"
Beispiel #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)"
Beispiel #7
0
def test_double_negation_elimination():
    assert double_negation_elimination("not not (A and B)") == "(A and B)"