本文整理匯總了Python中datalad.support.annexrepo.AnnexRepo.proxy方法的典型用法代碼示例。如果您正苦於以下問題:Python AnnexRepo.proxy方法的具體用法?Python AnnexRepo.proxy怎麽用?Python AnnexRepo.proxy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類datalad.support.annexrepo.AnnexRepo
的用法示例。
在下文中一共展示了AnnexRepo.proxy方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: ok_clean_git_annex_proxy
# 需要導入模塊: from datalad.support.annexrepo import AnnexRepo [as 別名]
# 或者: from datalad.support.annexrepo.AnnexRepo import proxy [as 別名]
def ok_clean_git_annex_proxy(path):
"""Helper to check, whether an annex in direct mode is clean
"""
# TODO: May be let's make a method of AnnexRepo for this purpose
ar = AnnexRepo(path)
cwd = getpwd()
chpwd(path)
try:
out = ar.proxy(['git', 'status'])
except CommandNotAvailableError as e:
raise SkipTest
finally:
chpwd(cwd)
assert_in(
"nothing to commit", out[0],
msg="git-status output via proxy not plausible: %s" % out[0]
)