本文整理汇总了Python中kiwi.xml_state.XMLState.get_system_ignore_packages方法的典型用法代码示例。如果您正苦于以下问题:Python XMLState.get_system_ignore_packages方法的具体用法?Python XMLState.get_system_ignore_packages怎么用?Python XMLState.get_system_ignore_packages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.xml_state.XMLState
的用法示例。
在下文中一共展示了XMLState.get_system_ignore_packages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestXMLState
# 需要导入模块: from kiwi.xml_state import XMLState [as 别名]
# 或者: from kiwi.xml_state.XMLState import get_system_ignore_packages [as 别名]
#.........这里部分代码省略.........
@patch('platform.machine')
def test_get_system_packages_some_arch(self, mock_machine):
mock_machine.return_value = 's390'
state = XMLState(
self.description.load()
)
assert state.get_system_packages() == [
'foo',
'gfxboot-branding-openSUSE',
'grub2-branding-openSUSE',
'ifplugd',
'iputils',
'kernel-default',
'openssh',
'plymouth-branding-openSUSE',
'vim'
]
def test_get_system_collections(self):
assert self.state.get_system_collections() == [
'base'
]
def test_get_system_products(self):
assert self.state.get_system_products() == [
'openSUSE'
]
def test_get_system_archives(self):
assert self.state.get_system_archives() == [
'/absolute/path/to/image.tgz'
]
def test_get_system_ignore_packages(self):
assert self.state.get_system_ignore_packages() == [
'bar', 'baz', 'foo'
]
self.state.host_architecture = 'aarch64'
assert self.state.get_system_ignore_packages() == [
'baz', 'foo'
]
self.state.host_architecture = 's390'
assert self.state.get_system_ignore_packages() == [
'baz'
]
def test_get_system_collection_type(self):
assert self.state.get_system_collection_type() == 'plusRecommended'
def test_get_bootstrap_collections(self):
assert self.state.get_bootstrap_collections() == [
'bootstrap-collection'
]
def test_get_bootstrap_products(self):
assert self.state.get_bootstrap_products() == ['kiwi']
def test_get_bootstrap_archives(self):
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() \