def unregister(self, entry, cls_): """ Remove the Interface from the registry :param entry: entry declaration of the model where the ``cls_`` must be removed :param cls_: Class Interface to remove in registry """ RegistryManager.remove_in_register(cls_)
def unregister(self, entry, cls_): """ Remove the Interface from the registry :param entry: entry declaration of the model where the ``cls_`` must be removed :param cls_: Class Interface to remove in the declaration """ RegistryManager.remove_in_register(cls_)
def test_remove_entry(self): class test: pass def has_test_in_removed(): core = RegistryManager.loaded_bloks['testEntry']['removed'] if test in core: return True return False RegistryManager.add_entry_in_register('Other', 'test', test) self.assertInEntry('test', test) self.assertFalse(has_test_in_removed()) RegistryManager.remove_in_register(test) self.assertTrue(has_test_in_removed())
def test_remove_core(self): class test: pass def has_test_in_removed(): core = RegistryManager.loaded_bloks['testCore']['removed'] if test in core: return True return False RegistryManager.add_core_in_register('test', test) self.assertInCore(test) self.assertEqual(has_test_in_removed(), False) RegistryManager.remove_in_register(test) self.assertEqual(has_test_in_removed(), True)
def test_remove_core(self): class test: pass def has_test_in_removed(): core = RegistryManager.loaded_bloks['testCore']['removed'] if test in core: return True return False RegistryManager.add_core_in_register('test', test) self.assertInCore(test) assert not has_test_in_removed() RegistryManager.remove_in_register(test) assert has_test_in_removed()