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