本文整理汇总了Python中osc2.wc.project.Project.wc_check方法的典型用法代码示例。如果您正苦于以下问题:Python Project.wc_check方法的具体用法?Python Project.wc_check怎么用?Python Project.wc_check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osc2.wc.project.Project
的用法示例。
在下文中一共展示了Project.wc_check方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_repair3
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import wc_check [as 别名]
def test_repair3(self):
"""test repair (invalid _packages xml)"""
path = self.fixture_file('inv4')
self.assertRaises(WCInconsistentError, Project, path)
self.assertRaises(ValueError, Project.repair, path)
Project.repair(path, added='A', missing=' ')
self.assertEqual(Project.wc_check(path), ([], '', []))
示例2: test_repair4
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import wc_check [as 别名]
def test_repair4(self):
"""test repair (wc + pkg data missing)"""
# remove package from _packages in this case
path = self.fixture_file('inv5')
self.assertRaises(WCInconsistentError, Project, path)
Project.repair(path)
self.assertEqual(Project.wc_check(path), ([], '', []))
prj = Project(path)
self.assertEqual(prj._status('missing'), '?')
self.assertEqual(prj._status('added'), 'A')
示例3: test_repair2
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import wc_check [as 别名]
def test_repair2(self):
"""test repair (missing pkg data; state ' ')"""
path = self.fixture_file('inv3')
self._not_exists(path, 'conflict', data=True)
self.assertRaises(WCInconsistentError, Project, path)
Project.repair(path)
self.assertEqual(Project.wc_check(path), ([], '', []))
self._exists(path, 'conflict', data=True)
prj = Project(path)
self.assertEqual(prj._status('conflict'), ' ')
self.assertIsNotNone(prj.package('conflict'))
示例4: test_repair1
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import wc_check [as 别名]
def test_repair1(self):
"""test repair (missing _project and storefile)"""
path = self.fixture_file('inv1')
self._not_exists(path, '_project', store=True)
self.assertRaises(WCInconsistentError, Project, path)
self.assertRaises(ValueError, Project.repair, path)
Project.repair(path, project='inv1')
self.assertEqual(Project.wc_check(path), ([], '', []))
self._exists(path, '_project', store=True)
prj = Project(path)
self.assertEqual(prj.name, 'inv1')