本文整理汇总了Python中dulwich.object_store.DiskObjectStore._read_alternate_paths方法的典型用法代码示例。如果您正苦于以下问题:Python DiskObjectStore._read_alternate_paths方法的具体用法?Python DiskObjectStore._read_alternate_paths怎么用?Python DiskObjectStore._read_alternate_paths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dulwich.object_store.DiskObjectStore
的用法示例。
在下文中一共展示了DiskObjectStore._read_alternate_paths方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_add_alternate_path
# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import _read_alternate_paths [as 别名]
def test_add_alternate_path(self):
store = DiskObjectStore(self.store_dir)
self.assertEquals([], store._read_alternate_paths())
store.add_alternate_path("/foo/path")
self.assertEquals(["/foo/path"], store._read_alternate_paths())
store.add_alternate_path("/bar/path")
self.assertEquals(
["/foo/path", "/bar/path"],
store._read_alternate_paths())
示例2: test_add_alternate_path
# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import _read_alternate_paths [as 别名]
def test_add_alternate_path(self):
store = DiskObjectStore(self.store_dir)
self.assertEqual([], list(store._read_alternate_paths()))
store.add_alternate_path(b'/foo/path')
self.assertEqual([b'/foo/path'], list(store._read_alternate_paths()))
store.add_alternate_path(b'/bar/path')
self.assertEqual(
[b'/foo/path', b'/bar/path'],
list(store._read_alternate_paths()))