def testBasic2(self): orig_protocolsForProcess = objc._objc.protocolsForProcess try: objc._objc.protocolsForProcess = lambda: [] PROTOCOL_CACHE.clear() p = objc.protocolNamed("NSObject") self.assertIsInstance(p, objc.formal_protocol) finally: objc._objc.protocolsForProcess = orig_protocolsForProcess
def testBasic(self): PROTOCOL_CACHE.clear() p = objc.protocolNamed("NSObject") self.assertIsInstance(p, objc.formal_protocol)