本文整理匯總了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)