コード例 #1
0
ファイル: test_task.py プロジェクト: kostyll/pakit
 def test_save_old_install(self):
     recipe = self.recipe
     InstallTask(recipe).run()
     task = UpdateTask(recipe)
     task.save_old_install()
     assert pakit.conf.IDB.get(recipe.name) is None
     assert not os.path.exists(recipe.install_dir)
     assert os.path.exists(recipe.install_dir + '_bak')
コード例 #2
0
ファイル: test_task.py プロジェクト: kostyll/pakit
 def test_restore_old_install(self):
     recipe = self.recipe
     InstallTask(recipe).run()
     task = UpdateTask(recipe)
     task.save_old_install()
     task.restore_old_install()
     assert pakit.conf.IDB.get(recipe.name)['hash'] == recipe.repo.src_hash
     assert os.path.exists(recipe.install_dir)
     assert not os.path.exists(recipe.install_dir + '_bak')
     recipe.verify()