def test_objcinstance_can_produce_objcclass(self): """Creating an ObjCInstance for a class pointer gives an ObjCClass.""" example_ptr = libobjc.objc_getClass(b"Example") Example = ObjCInstance(example_ptr) self.assertEqual(Example, ObjCClass("Example")) self.assertIsInstance(Example, ObjCClass)
def test_class_by_pointer(self): """An Objective-C class can be created from a pointer.""" example_ptr = libobjc.objc_getClass(b"Example") Example = ObjCClass(example_ptr) self.assertEqual(Example, ObjCClass("Example"))