def test_sizeof_returnsSize(self, size): ctype = cdm.CProxyType(size) assert ctype.sizeof == size
def test_eq_onDifferentSizedTypes_returnsFalse(self): assert cdm.CProxyType(2) != cdm.CProxyType(1)
def test_eq_onSameAttributes_returnsTrue(self): ctype1 = cdm.CProxyType(1).with_attr('a').with_attr('b') ctype2 = cdm.CProxyType(1).with_attr('b').with_attr('a') assert ctype1 == ctype2 assert not ctype1 != ctype2
def test_eq_onDifferentAttributes_returnsFalse(self): ctype1 = cdm.CProxyType(1).with_attr('a').with_attr('c') ctype2 = cdm.CProxyType(1).with_attr('a').with_attr('b') assert not ctype1 == ctype2 assert ctype1 != ctype2
def test_bind_bindsAlsoBaseElement(self, addrspace): ctype = cdm.CProxyType(1) carray_type = cdm.CArrayType(ctype, 10) bound_carray_type = carray_type.bind(addrspace) assert bound_carray_type.base_type.__addrspace__ is addrspace