本文整理汇总了Python中osc2.wc.project.Project.remove方法的典型用法代码示例。如果您正苦于以下问题:Python Project.remove方法的具体用法?Python Project.remove怎么用?Python Project.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osc2.wc.project.Project
的用法示例。
在下文中一共展示了Project.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test18
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import remove [as 别名]
def test18(self):
"""test remove (also check if the files were removed)"""
path = self.fixture_file('prj2')
prj = Project(path)
self.assertEqual(prj._status('bar'), 'A')
prj.remove('bar')
self.assertEqual(prj._status('bar'), '?')
self._not_exists(path, 'bar')
self._not_exists(path, 'bar', data=True)
示例2: test19
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import remove [as 别名]
def test19(self):
"""test remove (all files removed)"""
path = self.fixture_file('prj2')
prj = Project(path)
pkg = prj.package('foo')
self.assertEqual(pkg.status('file'), ' ')
self.assertEqual(prj._status('foo'), ' ')
self._exists(path, 'foo', 'file')
prj.remove('foo')
self._exists(path, 'foo')
self._not_exists(path, 'foo', 'file')
self.assertEqual(prj._status('foo'), 'D')
pkg = prj.package('foo')
self.assertEqual(pkg.status('file'), 'D')
示例3: test15
# 需要导入模块: from osc2.wc.project import Project [as 别名]
# 或者: from osc2.wc.project.Project import remove [as 别名]
def test15(self):
"""test remove"""
path = self.fixture_file('prj2')
prj = Project(path)
# delete foo
self.assertEqual(prj._status('foo'), ' ')
prj.remove('foo')
self.assertEqual(prj._status('foo'), 'D')
self.assertTrue(os.path.exists(self.fixture_file('prj2', 'foo')))
# delete xxx
self.assertEqual(prj._status('xxx'), '!')
prj.remove('xxx')
self.assertEqual(prj._status('xxx'), 'D')
# delete bar
self.assertEqual(prj._status('bar'), 'A')
prj.remove('bar')
self.assertEqual(prj._status('bar'), '?')