当前位置: 首页>>代码示例>>Python>>正文


Python XMLState.get_to_become_deleted_packages方法代码示例

本文整理汇总了Python中kiwi.xml_state.XMLState.get_to_become_deleted_packages方法的典型用法代码示例。如果您正苦于以下问题:Python XMLState.get_to_become_deleted_packages方法的具体用法?Python XMLState.get_to_become_deleted_packages怎么用?Python XMLState.get_to_become_deleted_packages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kiwi.xml_state.XMLState的用法示例。


在下文中一共展示了XMLState.get_to_become_deleted_packages方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_copy_bootdelete_packages_no_delete_section_in_boot_descr

# 需要导入模块: from kiwi.xml_state import XMLState [as 别名]
# 或者: from kiwi.xml_state.XMLState import get_to_become_deleted_packages [as 别名]
 def test_copy_bootdelete_packages_no_delete_section_in_boot_descr(self):
     boot_description = XMLDescription(
         '../data/isoboot/example-distribution-no-delete-section/config.xml'
     )
     boot_state = XMLState(
         boot_description.load()
     )
     self.state.copy_bootdelete_packages(boot_state)
     to_delete_packages = boot_state.get_to_become_deleted_packages()
     assert 'vim' in to_delete_packages
开发者ID:ChrisBr,项目名称:kiwi,代码行数:12,代码来源:xml_state_test.py

示例2: test_copy_bootincluded_packages_with_image_packages

# 需要导入模块: from kiwi.xml_state import XMLState [as 别名]
# 或者: from kiwi.xml_state.XMLState import get_to_become_deleted_packages [as 别名]
 def test_copy_bootincluded_packages_with_image_packages(self):
     boot_description = XMLDescription(
         '../data/isoboot/example-distribution/config.xml'
     )
     boot_state = XMLState(boot_description.load(), ['std'])
     self.state.copy_bootincluded_packages(boot_state)
     image_packages = boot_state.get_system_packages()
     assert 'plymouth-branding-openSUSE' in image_packages
     assert 'grub2-branding-openSUSE' in image_packages
     assert 'gfxboot-branding-openSUSE' in image_packages
     to_delete_packages = boot_state.get_to_become_deleted_packages()
     assert 'gfxboot-branding-openSUSE' not in to_delete_packages
开发者ID:Conan-Kudo,项目名称:kiwi,代码行数:14,代码来源:xml_state_test.py

示例3: TestXMLState

# 需要导入模块: from kiwi.xml_state import XMLState [as 别名]
# 或者: from kiwi.xml_state.XMLState import get_to_become_deleted_packages [as 别名]

#.........这里部分代码省略.........
        assert self.state.get_bootstrap_archives() == ['bootstrap.tgz']

    def test_get_bootstrap_collection_type(self):
        assert self.state.get_bootstrap_collection_type() == 'onlyRequired'

    def test_translate_obs_to_ibs_repositories(self):
        self.state.translate_obs_to_ibs_repositories()
        source_path = self.state.xml_data.get_repository()[1].get_source()
        assert source_path.get_path() == \
            'ibs://Devel:PubCloud:AmazonEC2/SLE_12_GA'

    def test_translate_obs_to_suse_repositories(self):
        self.state.translate_obs_to_suse_repositories()
        source_path = self.state.xml_data.get_repository()[1].get_source()
        assert source_path.get_path() == \
            'suse://Devel:PubCloud:AmazonEC2/SLE_12_GA'

    def test_set_repository(self):
        self.state.set_repository('repo', 'type', 'alias', 1)
        assert self.state.xml_data.get_repository()[0].get_source().get_path() \
            == 'repo'
        assert self.state.xml_data.get_repository()[0].get_type() == 'type'
        assert self.state.xml_data.get_repository()[0].get_alias() == 'alias'
        assert self.state.xml_data.get_repository()[0].get_priority() == 1

    def test_add_repository(self):
        self.state.add_repository('repo', 'type', 'alias', 1)
        assert self.state.xml_data.get_repository()[2].get_source().get_path() \
            == 'repo'
        assert self.state.xml_data.get_repository()[2].get_type() == 'type'
        assert self.state.xml_data.get_repository()[2].get_alias() == 'alias'
        assert self.state.xml_data.get_repository()[2].get_priority() == 1

    def test_get_to_become_deleted_packages(self):
        assert self.state.get_to_become_deleted_packages() == [
            'kernel-debug'
        ]

    def test_get_build_type_system_disk_section(self):
        assert self.state.get_build_type_system_disk_section().get_name() == \
            'mydisk'

    def test_get_build_type_vmdisk_section(self):
        assert self.state.get_build_type_vmdisk_section().get_id() == 0

    def test_get_volume_management(self):
        assert self.state.get_volume_management() == 'lvm'

    def test_get_volume_management_none(self):
        assert self.boot_state.get_volume_management() is None

    def test_get_volume_management_btrfs(self):
        description = XMLDescription('../data/example_btrfs_config.xml')
        xml_data = description.load()
        state = XMLState(xml_data)
        assert state.get_volume_management() == 'btrfs'

    def test_get_volume_management_lvm_prefer(self):
        description = XMLDescription('../data/example_lvm_preferred_config.xml')
        xml_data = description.load()
        state = XMLState(xml_data)
        assert state.get_volume_management() == 'lvm'

    def test_get_volume_management_lvm_default(self):
        description = XMLDescription('../data/example_lvm_default_config.xml')
        xml_data = description.load()
开发者ID:toabctl,项目名称:kiwi,代码行数:70,代码来源:xml_state_test.py

示例4: TestXMLState

# 需要导入模块: from kiwi.xml_state import XMLState [as 别名]
# 或者: from kiwi.xml_state.XMLState import get_to_become_deleted_packages [as 别名]

#.........这里部分代码省略.........
        assert self.state.get_bootstrap_archives() == ['bootstrap.tgz']

    def test_get_bootstrap_collection_type(self):
        assert self.state.get_bootstrap_collection_type() == 'onlyRequired'

    def test_set_repository(self):
        self.state.set_repository('repo', 'type', 'alias', 1, True, False)
        assert self.state.xml_data.get_repository()[0].get_source().get_path() \
            == 'repo'
        assert self.state.xml_data.get_repository()[0].get_type() == 'type'
        assert self.state.xml_data.get_repository()[0].get_alias() == 'alias'
        assert self.state.xml_data.get_repository()[0].get_priority() == 1
        assert self.state.xml_data.get_repository()[0].get_imageinclude() is True
        assert self.state.xml_data.get_repository()[0].get_package_gpgcheck() is False

    def test_add_repository(self):
        self.state.add_repository('repo', 'type', 'alias', 1, True)
        assert self.state.xml_data.get_repository()[3].get_source().get_path() \
            == 'repo'
        assert self.state.xml_data.get_repository()[3].get_type() == 'type'
        assert self.state.xml_data.get_repository()[3].get_alias() == 'alias'
        assert self.state.xml_data.get_repository()[3].get_priority() == 1
        assert self.state.xml_data.get_repository()[3].get_imageinclude() is True

    def test_add_repository_with_empty_values(self):
        self.state.add_repository('repo', 'type', '', '', True)
        assert self.state.xml_data.get_repository()[3].get_source().get_path() \
            == 'repo'
        assert self.state.xml_data.get_repository()[3].get_type() == 'type'
        assert self.state.xml_data.get_repository()[3].get_alias() == ''
        assert self.state.xml_data.get_repository()[3].get_priority() is None
        assert self.state.xml_data.get_repository()[3].get_imageinclude() is True

    def test_get_to_become_deleted_packages(self):
        assert self.state.get_to_become_deleted_packages() == [
            'kernel-debug'
        ]

    def test_get_build_type_vagrant_config_section(self):
        vagrant_config = self.state.get_build_type_vagrant_config_section()
        assert vagrant_config.get_provider() == 'libvirt'

    def test_get_build_type_system_disk_section(self):
        assert self.state.get_build_type_system_disk_section().get_name() == \
            'mydisk'

    def test_get_build_type_vmdisk_section(self):
        assert self.state.get_build_type_vmdisk_section().get_id() == 0

    def test_get_build_type_vmnic_entries(self):
        assert self.state.get_build_type_vmnic_entries()[0].get_interface() \
            == ''
        assert self.boot_state.get_build_type_vmnic_entries() == []

    def test_get_build_type_vmdvd_section(self):
        assert self.state.get_build_type_vmdvd_section().get_id() == 0

    def test_get_volume_management(self):
        assert self.state.get_volume_management() == 'lvm'

    def test_get_volume_management_none(self):
        assert self.boot_state.get_volume_management() is None

    def test_get_volume_management_btrfs(self):
        description = XMLDescription('../data/example_btrfs_config.xml')
        xml_data = description.load()
开发者ID:Conan-Kudo,项目名称:kiwi,代码行数:70,代码来源:xml_state_test.py


注:本文中的kiwi.xml_state.XMLState.get_to_become_deleted_packages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。