Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Open
Description
Bug report
Bug description:
# Add a code block here, if requireddeftest_set_type_updates_format(self):# to match the element type's formatwithself.assertWarns(DeprecationWarning):lp=POINTER("node")classnode(Structure):_fields_= [("value",c_int)]# Get the expected format before set_typenode_format=memoryview(node()).formatexpected_format="&"+node_formatlp.set_type(node)# Create instance to check format via memoryviewn=node(42)p=lp(n)actual_format=memoryview(p).format# After set_type, the pointer's format should be "&<element_format>"self.assertEqual(actual_format,expected_format)
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS