当前位置: 首页>>代码示例>>Python>>正文


Python BlokManager.unload方法代码示例

本文整理汇总了Python中anyblok.blok.BlokManager.unload方法的典型用法代码示例。如果您正苦于以下问题:Python BlokManager.unload方法的具体用法?Python BlokManager.unload怎么用?Python BlokManager.unload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在anyblok.blok.BlokManager的用法示例。


在下文中一共展示了BlokManager.unload方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: tearDown

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
    def tearDown(self):
        """ Clear the registry, unload the blok manager and  drop the database
        """
        if self.registry:
            self.registry.close()

        RegistryManager.clear()
        BlokManager.unload()
        super(DBTestCase, self).tearDown()
开发者ID:petrus-v,项目名称:AnyBlok,代码行数:11,代码来源:testcase.py

示例2: tearDown

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
 def tearDown(self):
     """ Clear the registry, unload the blok manager and  drop the database
     """
     registry = RegistryManager.get(Configuration.get('db_name'))
     registry.close()
     RegistryManager.clear()
     BlokManager.unload()
     clear_mappers()
     self.__class__.dropdb()
     super(TestBlok, self).tearDown()
开发者ID:AnyBlok,项目名称:AnyBlok_Multi_Engines,代码行数:12,代码来源:test_blok.py

示例3: test_start_function

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
    def test_start_function(self):
        BlokManager.unload()
        db_name = Configuration.get('db_name') or 'test_anyblok'
        db_driver_name = Configuration.get('db_driver_name') or 'postgresql'

        testargs = ['default', '--db-name', db_name, '--db-driver-name',
                    db_driver_name]
        with patch.object(sys, 'argv', testargs):
            registry = start('default')

        self.assertIsNotNone(registry)
开发者ID:AnyBlok,项目名称:AnyBlok,代码行数:13,代码来源:test_registry.py

示例4: setUpClass

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
    def setUpClass(cls):
        """ Intialialise the configuration manager """

        super(DBTestCase, cls).setUpClass()
        cls.init_configuration_manager()
        if cls.createdb(keep_existing=True):
            BlokManager.load(entry_points=('bloks', 'test_bloks'))
            registry = cls.getRegistry()
            registry.commit()
            registry.close()
            BlokManager.unload()
开发者ID:jssuzanne,项目名称:AnyBlok,代码行数:13,代码来源:testcase.py

示例5: test_anyblok_core_loaded

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
 def test_anyblok_core_loaded(self):
     BlokManager.load()
     is_exist = 'anyblok-core' in RegistryManager.loaded_bloks
     self.assertEqual(is_exist, True)
     anyblokcore = RegistryManager.loaded_bloks['anyblok-core']
     self.assertEqual(len(anyblokcore['Core']['Base']), 1)
     self.assertEqual(len(anyblokcore['Core']['SqlBase']), 1)
     self.assertEqual(len(anyblokcore['Core']['SqlViewBase']), 1)
     self.assertEqual(len(anyblokcore['Core']['Session']), 1)
     self.assertEqual(len(anyblokcore['Core']['Query']), 1)
     self.assertEqual(len(anyblokcore['Core']['InstrumentedList']), 1)
     is_exist = 'Model.System' in anyblokcore['Model']
     self.assertEqual(is_exist, True)
     BlokManager.unload()
开发者ID:AnyBlok,项目名称:AnyBlok,代码行数:16,代码来源:test_registry_manager.py

示例6: tearDown

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
 def tearDown(self):
     super(TestBlokManager, self).tearDown()
     BlokManager.unload()
开发者ID:petrus-v,项目名称:AnyBlok,代码行数:5,代码来源:test_blok.py

示例7: tearDownClass

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
 def tearDownClass(cls):
     super(TestMigration, cls).tearDownClass()
     BlokManager.unload()
     RegistryManager.loaded_bloks = cls.loaded_bloks
     cls.dropdb()
开发者ID:AnyBlok,项目名称:AnyBlok,代码行数:7,代码来源:test_migration.py

示例8: test_reload_blok

# 需要导入模块: from anyblok.blok import BlokManager [as 别名]
# 或者: from anyblok.blok.BlokManager import unload [as 别名]
 def test_reload_blok(self):
     BlokManager.load()
     try:
         RegistryManager.reload()
     finally:
         BlokManager.unload()
开发者ID:AnyBlok,项目名称:AnyBlok,代码行数:8,代码来源:test_registry_manager.py


注:本文中的anyblok.blok.BlokManager.unload方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。