def test_subs():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert ((A & B).subs(A, True) == B)
    assert ((A & B).subs(A, False) == False)
    assert ((A & B).subs(B, True) == A)
    assert ((A & B).subs(B, False) == False)
    assert ((A & B).subs({A: True, B: True}) == True)
    assert ((A | B).subs(A, True) == True)
    assert ((A | B).subs(A, False) == B)
    assert ((A | B).subs(B, True) == True)
    assert ((A | B).subs(B, False) == A)
    assert ((A | B).subs({A: True, B: True}) == True)
def test_subs():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert ((A & B).subs(A, True) == B)
    assert ((A & B).subs(A, False) == False)
    assert ((A & B).subs(B, True) == A)
    assert ((A & B).subs(B, False) == False)
    assert ((A & B).subs({A: True, B: True}) == True)
    assert ((A | B).subs(A, True) == True)
    assert ((A | B).subs(A, False) == B)
    assert ((A | B).subs(B, True) == True)
    assert ((A | B).subs(B, False) == A)
    assert ((A | B).subs({A: True, B: True}) == True)