def test_flip():

    class Product2(Product):
        x = In(Bit)
        y = Out(Bit)
    print(Product2)
    print(Flip(Product2))
    Tin = In(Product2)
    Tout = Out(Product2)
    print(Tin)
    print(Tout)
    assert (Tin == Product2)
    assert (Tout == Product2)
    assert (Tin == Tout)
    assert (Tin is not Product2)
    assert (Tout is not Product2)
    assert (Tin is not Tout)
    T = In(Tout)
    assert (T == Tin)
    T = Out(Tin)
    assert (T == Tout)
def test_flip():

    class Product2(Product):
        x = In(Bit)
        y = Out(Bit)
    print(Product2)
    print(Flip(Product2))
    Tin = In(Product2)
    Tout = Out(Product2)
    print(Tin)
    print(Tout)
    assert (Tin == Product2)
    assert (Tout == Product2)
    assert (Tin == Tout)
    assert (Tin is not Product2)
    assert (Tout is not Product2)
    assert (Tin is not Tout)
    T = In(Tout)
    assert (T == Tin)
    T = Out(Tin)
    assert (T == Tout)