本文整理汇总了Python中osc2.wc.project.Project._calculate_updateinfo方法的典型用法代码示例。如果您正苦于以下问题:Python Project._calculate_updateinfo方法的具体用法?Python Project._calculate_updateinfo怎么用?Python Project._calculate_updateinfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osc2.wc.project.Project
的用法示例。
在下文中一共展示了Project._calculate_updateinfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test8
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_updateinfo [as 别名]
def test8(self):
"""test _calculate_updateinfo 2"""
path = self.fixture_file('prj2')
prj = Project(path)
uinfo = prj._calculate_updateinfo()
self.assertEqual(uinfo.candidates, ['foo', 'foo_modified'])
self.assertEqual(uinfo.added, ['osc'])
self.assertEqual(uinfo.deleted, ['abc', 'xxx', 'del'])
# local state: A
self.assertEqual(uinfo.conflicted, ['bar'])
示例2: test8_1
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_updateinfo [as 别名]
def test8_1(self):
"""test _calculate_updateinfo 3 (specify packages)"""
path = self.fixture_file('prj2')
prj = Project(path)
uinfo = prj._calculate_updateinfo('foo', 'osc', 'del')
self.assertEqual(uinfo.candidates, ['foo'])
self.assertEqual(uinfo.added, ['osc'])
self.assertEqual(uinfo.deleted, ['del'])
# no conflicts because bar shouldn't be added/updated
self.assertEqual(uinfo.conflicted, [])
示例3: test7
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_updateinfo [as 别名]
def test7(self):
"""test _calculate_updateinfo"""
path = self.fixture_file('prj2')
prj = Project(path)
uinfo = prj._calculate_updateinfo()
self.assertEqual(uinfo.candidates, ['foo', 'abc'])
self.assertEqual(uinfo.added, ['osc'])
self.assertEqual(uinfo.deleted, ['del', 'foo_modified'])
self.assertEqual(uinfo.conflicted, ['xxx'])
self.assertEqual(uinfo.name, 'prj2')
示例4: test9
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_updateinfo [as 别名]
def test9(self):
"""test _calculate_updateinfo 3 (empty package list)"""
path = self.fixture_file('prj2')
prj = Project(path)
self.assertEqual(prj._status('bar'), 'A')
uinfo = prj._calculate_updateinfo()
self.assertEqual(uinfo.candidates, [])
self.assertEqual(uinfo.added, [])
self.assertEqual(uinfo.deleted, ['foo', 'abc', 'xxx', 'del',
'foo_modified'])
self.assertEqual(uinfo.conflicted, [])