本文整理汇总了Python中datalad.support.annexrepo.AnnexRepo.set_direct_mode方法的典型用法代码示例。如果您正苦于以下问题:Python AnnexRepo.set_direct_mode方法的具体用法?Python AnnexRepo.set_direct_mode怎么用?Python AnnexRepo.set_direct_mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datalad.support.annexrepo.AnnexRepo
的用法示例。
在下文中一共展示了AnnexRepo.set_direct_mode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_AnnexRepo_set_direct_mode
# 需要导入模块: from datalad.support.annexrepo import AnnexRepo [as 别名]
# 或者: from datalad.support.annexrepo.AnnexRepo import set_direct_mode [as 别名]
def test_AnnexRepo_set_direct_mode(src, dst):
ar = AnnexRepo(dst, src)
ar.set_direct_mode(True)
assert_true(ar.is_direct_mode(), "Switching to direct mode failed.")
if ar.is_crippled_fs():
assert_raises(CommandNotAvailableError, ar.set_direct_mode, False)
assert_true(ar.is_direct_mode(), "Indirect mode on crippled fs detected. Shouldn't be possible.")
else:
ar.set_direct_mode(False)
assert_false(ar.is_direct_mode(), "Switching to indirect mode failed.")
示例2: test_AnnexRepo_annex_proxy
# 需要导入模块: from datalad.support.annexrepo import AnnexRepo [as 别名]
# 或者: from datalad.support.annexrepo.AnnexRepo import set_direct_mode [as 别名]
def test_AnnexRepo_annex_proxy(src, annex_path):
ar = AnnexRepo(annex_path, src)
ar.set_direct_mode(True)
ok_clean_git_annex_proxy(path=annex_path)