Exemple #1
0
def test_de_morgans_law_negated_key_with_gate():
    assert de_morgans_law(
        "content:hi and not (user or author or creator):someone")
Exemple #2
0
def test_de_morgans_law_negated_word_with_gate():
    assert de_morgans_law(
        "user:someone and not type:(nominate or qualify)"
    ) == "user:someone and type:(not nominate and not qualify)"
Exemple #3
0
def test_de_morgans_law_negated_word():
    assert de_morgans_law("not type:(nominate or qualify)"
                          ) == "type:(not nominate and not qualify)"
Exemple #4
0
def test_de_morgans_law_elimination():
    assert de_morgans_law("not not (A and B)") == "(A and B)"
Exemple #5
0
def test_de_morgans_law_complex():
    assert de_morgans_law(
        "x not (D and not (A or B and C) or E and F)y"
    ) == "x ((not D or (A or B and C)) and (not E or not F))y"
Exemple #6
0
def test_de_morgans_law():
    assert de_morgans_law(
        "not (A or B and C)") == "(not A and (not B or not C))"