本文整理汇总了Python中anyblok.registry.RegistryManager.remove_in_register方法的典型用法代码示例。如果您正苦于以下问题:Python RegistryManager.remove_in_register方法的具体用法?Python RegistryManager.remove_in_register怎么用?Python RegistryManager.remove_in_register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类anyblok.registry.RegistryManager
的用法示例。
在下文中一共展示了RegistryManager.remove_in_register方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: unregister
# 需要导入模块: from anyblok.registry import RegistryManager [as 别名]
# 或者: from anyblok.registry.RegistryManager import remove_in_register [as 别名]
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_)
示例2: test_remove_entry
# 需要导入模块: from anyblok.registry import RegistryManager [as 别名]
# 或者: from anyblok.registry.RegistryManager import remove_in_register [as 别名]
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())
示例3: test_remove_core
# 需要导入模块: from anyblok.registry import RegistryManager [as 别名]
# 或者: from anyblok.registry.RegistryManager import remove_in_register [as 别名]
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)