本文整理汇总了Python中arctic.store.version_store.VersionStore.initialize_library方法的典型用法代码示例。如果您正苦于以下问题:Python VersionStore.initialize_library方法的具体用法?Python VersionStore.initialize_library怎么用?Python VersionStore.initialize_library使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arctic.store.version_store.VersionStore
的用法示例。
在下文中一共展示了VersionStore.initialize_library方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_initialize_library
# 需要导入模块: from arctic.store.version_store import VersionStore [as 别名]
# 或者: from arctic.store.version_store.VersionStore import initialize_library [as 别名]
def test_initialize_library():
arctic_lib = create_autospec(ArcticLibraryBinding)
arctic_lib.arctic = create_autospec(Arctic, _allow_secondary=False)
with patch('arctic.store.version_store.enable_sharding', autospec=True) as enable_sharding:
arctic_lib.get_top_level_collection.return_value.database.create_collection.__name__ = 'some_name'
arctic_lib.get_top_level_collection.return_value.database.collection_names.__name__ = 'some_name'
VersionStore.initialize_library(arctic_lib, hashed=sentinel.hashed)
assert enable_sharding.call_args_list == [call(arctic_lib.arctic, arctic_lib.get_name(), hashed=sentinel.hashed)]