def test_val():

    class A2(Product):
        x = Bit
        y = Bit
    a = A2(name='a')
    print('created A2')
    assert isinstance(a, Product)
    assert (str(a) == 'a')
    print('a["x"]')
    b = a['x']
    assert isinstance(b, Bit)
    assert (str(b) == 'a.x')
    print('a.x')
    b = a.x
    assert isinstance(b, Bit)
    assert (str(b) == 'a.x')
def test_val():

    class A2(Product):
        x = Bit
        y = Bit
    a = A2(name='a')
    print('created A2')
    assert isinstance(a, Product)
    assert (str(a) == 'a')
    print('a["x"]')
    b = a['x']
    assert isinstance(b, Bit)
    assert (str(b) == 'a.x')
    print('a.x')
    b = a.x
    assert isinstance(b, Bit)
    assert (str(b) == 'a.x')