本文整理匯總了Python中pkgpanda.Install.recover_swap_active方法的典型用法代碼示例。如果您正苦於以下問題:Python Install.recover_swap_active方法的具體用法?Python Install.recover_swap_active怎麽用?Python Install.recover_swap_active使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pkgpanda.Install
的用法示例。
在下文中一共展示了Install.recover_swap_active方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_recovery_move_new
# 需要導入模塊: from pkgpanda import Install [as 別名]
# 或者: from pkgpanda.Install import recover_swap_active [as 別名]
def test_recovery_move_new(tmpdir):
# From the "move_new" state correctly.
shutil.copytree("resources/install_recovery_move", str(tmpdir.join("install")), symlinks=True)
install = Install(str(tmpdir.join("install")), "resources/systemd", True, False, True)
action, _ = install.recover_swap_active()
assert action
# TODO(cmaloney): expect_fs
expect_fs(
str(tmpdir.join("install")),
{
".gitignore": None,
"active": ["mesos"],
"active.buildinfo.full.json": None,
"bin": ["mesos", "mesos-dir"],
"dcos.target.wants": [".gitignore"],
"environment": None,
"environment.export": None,
"etc": [".gitignore"],
"include": [".gitignore"],
"lib": ["libmesos.so"]
})