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] )