Exemple #1
0
END_TEST

START_TEST(test_goal_actions)
{
    DnfPackage *pkg = get_latest_pkg(test_globals.sack, "walrus");
    HyGoal goal = hy_goal_create(test_globals.sack);
    fail_if(hy_goal_has_actions(goal, DNF_INSTALL));
    fail_if(hy_goal_install(goal, pkg));
    fail_unless(hy_goal_has_actions(goal, DNF_INSTALL));
    g_object_unref(pkg);
    hy_goal_free(goal);
}
Exemple #2
0
END_TEST

START_TEST(test_goal_actions)
{
    HyPackage pkg = get_latest_pkg(test_globals.sack, "walrus");
    HyGoal goal = hy_goal_create(test_globals.sack);
    fail_if(hy_goal_has_actions(goal, HY_INSTALL));
    fail_if(hy_goal_install(goal, pkg));
    fail_unless(hy_goal_has_actions(goal, HY_INSTALL));
    hy_package_free(pkg);
    hy_goal_free(goal);
}
Exemple #3
0
static PyObject *
req_has_upgrade_all(_GoalObject *self, PyObject *unused)
{
    return PyBool_FromLong(hy_goal_has_actions(self->goal, HY_UPGRADE_ALL));
}
Exemple #4
0
static PyObject *
req_has_erase(_GoalObject *self, PyObject *unused)
{
    return PyBool_FromLong(hy_goal_has_actions(self->goal, HY_ERASE));
}
Exemple #5
0
static PyObject *
has_actions(_GoalObject *self, PyObject *action)
{
    return PyBool_FromLong(hy_goal_has_actions(self->goal, PyLong_AsLong(action)));
}