예제 #1
0
    def Packages(self) -> Structure:
        """The packages configuration.

        :return: a structure of the type PackagesConfigurationData
        """
        return PackagesConfigurationData.to_structure(
            self.implementation.packages)
예제 #2
0
    def packages_property_test(self):
        """Test the Packages property."""
        data = {
            "core-group-enabled":
            get_variant(Bool, False),
            "default-environment-enabled":
            get_variant(Bool, False),
            "environment":
            get_variant(Str, "environment"),
            "groups":
            get_variant(List[Str], ["g1", "g2"]),
            "groups-package-types":
            get_variant(Dict[Str, List[Str]], {
                "g1": GROUP_PACKAGE_TYPES_ALL,
                "g2": GROUP_PACKAGE_TYPES_REQUIRED
            }),
            "excluded-groups":
            get_variant(List[Str], ["g3", "g4"]),
            "packages":
            get_variant(List[Str], ["p1", "p2"]),
            "excluded-packages":
            get_variant(List[Str], ["p3", "p4"]),
            "docs-excluded":
            get_variant(Bool, True),
            "weakdeps-excluded":
            get_variant(Bool, True),
            "missing-ignored":
            get_variant(Bool, True),
            "broken-ignored":
            get_variant(Bool, True),
            "languages":
            get_variant(Str, "en,es"),
            "multilib-policy":
            get_variant(Str, MULTILIB_POLICY_ALL),
            "timeout":
            get_variant(Int, 10),
            "retries":
            get_variant(Int, 5),
        }

        self._check_dbus_property("Packages", data)

        data = PackagesConfigurationData.to_structure(
            PackagesConfigurationData())

        self._check_dbus_property("Packages", data)