本文整理汇总了Python中depot.manager.DepotManager.alias方法的典型用法代码示例。如果您正苦于以下问题:Python DepotManager.alias方法的具体用法?Python DepotManager.alias怎么用?Python DepotManager.alias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类depot.manager.DepotManager
的用法示例。
在下文中一共展示了DepotManager.alias方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: from depot.manager import DepotManager [as 别名]
# 或者: from depot.manager.DepotManager import alias [as 别名]
def setup():
setup_database()
DepotManager._clear()
DepotManager.configure('default', {'depot.storage_path': './lfs'})
DepotManager.configure('another', {'depot.storage_path': './lfs'})
DepotManager.alias('another_alias', 'another')
DepotManager.make_middleware(None)
示例2: test_aliases
# 需要导入模块: from depot.manager import DepotManager [as 别名]
# 或者: from depot.manager.DepotManager import alias [as 别名]
def test_aliases(self):
DepotManager.configure('first', {'depot.storage_path': './lfs'})
DepotManager.configure('second', {'depot.storage_path': './lfs2'})
DepotManager.alias('used_storage', 'first')
storage = DepotManager.get('used_storage')
assert storage.storage_path == './lfs', storage
DepotManager.alias('used_storage', 'second')
storage = DepotManager.get('used_storage')
assert storage.storage_path == './lfs2', storage
示例3: test_alias_on_existing_storage
# 需要导入模块: from depot.manager import DepotManager [as 别名]
# 或者: from depot.manager.DepotManager import alias [as 别名]
def test_alias_on_existing_storage(self):
DepotManager.configure('mystorage', {'depot.storage_path': './lfs2'})
DepotManager.alias('mystorage', 'mystorage')
示例4: test_aliases_not_existing
# 需要导入模块: from depot.manager import DepotManager [as 别名]
# 或者: from depot.manager.DepotManager import alias [as 别名]
def test_aliases_not_existing(self):
DepotManager.alias('used_storage', 'first')