本文整理汇总了Python中osc2.wc.project.Project._calculate_commitinfo方法的典型用法代码示例。如果您正苦于以下问题:Python Project._calculate_commitinfo方法的具体用法?Python Project._calculate_commitinfo怎么用?Python Project._calculate_commitinfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osc2.wc.project.Project
的用法示例。
在下文中一共展示了Project._calculate_commitinfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_commitinfo2
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_commitinfo [as 别名]
def test_commitinfo2(self):
"""test commitinfo (only specified packages)"""
path = self.fixture_file('prj2')
prj = Project(path)
self.assertEqual(prj._status('foo'), ' ')
self.assertEqual(prj._status('foo_modified'), ' ')
cinfo = prj._calculate_commitinfo('foo', 'foo_modified')
self.assertEqual(cinfo.unchanged, ['foo'])
self.assertEqual(cinfo.added, [])
self.assertEqual(cinfo.deleted, [])
self.assertEqual(cinfo.modified, ['foo_modified'])
self.assertEqual(cinfo.conflicted, [])
示例2: test_commitinfo1
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import _calculate_commitinfo [as 别名]
def test_commitinfo1(self):
"""test commitinfo (complete project)"""
path = self.fixture_file('prj2')
prj = Project(path)
self.assertEqual(prj._status('foo'), ' ')
self.assertEqual(prj._status('bar'), 'A')
self.assertEqual(prj._status('abc'), 'D')
self.assertEqual(prj._status('xxx'), '!')
self.assertEqual(prj._status('del'), 'D')
cinfo = prj._calculate_commitinfo()
self.assertEqual(cinfo.unchanged, ['foo'])
self.assertEqual(cinfo.added, ['bar'])
self.assertEqual(cinfo.deleted, ['abc', 'del'])
self.assertEqual(cinfo.modified, ['foo_modified'])
self.assertEqual(cinfo.conflicted, ['xxx'])
self.assertEqual(cinfo.name, 'prj2')