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


Python Project._calculate_updateinfo方法代码示例

本文整理汇总了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'])
开发者ID:scarabeusiv,项目名称:osc2,代码行数:12,代码来源:test_project.py

示例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, [])
开发者ID:scarabeusiv,项目名称:osc2,代码行数:12,代码来源:test_project.py

示例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')
开发者ID:scarabeusiv,项目名称:osc2,代码行数:12,代码来源:test_project.py

示例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, [])
开发者ID:scarabeusiv,项目名称:osc2,代码行数:13,代码来源:test_project.py


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