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


Python IconsCollection.renameGroup方法代码示例

本文整理汇总了Python中outwiker.core.iconscollection.IconsCollection.renameGroup方法的典型用法代码示例。如果您正苦于以下问题:Python IconsCollection.renameGroup方法的具体用法?Python IconsCollection.renameGroup怎么用?Python IconsCollection.renameGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在outwiker.core.iconscollection.IconsCollection的用法示例。


在下文中一共展示了IconsCollection.renameGroup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testRenameGroup_03_self

# 需要导入模块: from outwiker.core.iconscollection import IconsCollection [as 别名]
# 或者: from outwiker.core.iconscollection.IconsCollection import renameGroup [as 别名]
    def testRenameGroup_03_self(self):
        os.mkdir(self.tempDir1)

        collection = IconsCollection(self.tempDir1)
        collection.addGroup('Новая группа')

        collection.renameGroup('Новая группа', 'Новая группа')
        self.assertEqual(collection.getGroups(), ['Новая группа'])

        newcollection = IconsCollection(self.tempDir1)
        self.assertEqual(newcollection.getGroups(), ['Новая группа'])
开发者ID:Jenyay,项目名称:outwiker,代码行数:13,代码来源:test_iconscollection.py

示例2: testRenameGroup_01

# 需要导入模块: from outwiker.core.iconscollection import IconsCollection [as 别名]
# 或者: from outwiker.core.iconscollection.IconsCollection import renameGroup [as 别名]
    def testRenameGroup_01 (self):
        os.mkdir (self.tempDir1)

        collection = IconsCollection (self.tempDir1)
        collection.addGroup (u'Новая группа')
        self.assertEqual (collection.getGroups(), [u'Новая группа'])

        collection.renameGroup (u'Новая группа', u'Переименованная группа')
        self.assertEqual (collection.getGroups(), [u'Переименованная группа'])

        newcollection1 = IconsCollection (self.tempDir1)
        self.assertEqual (newcollection1.getGroups(), [u'Переименованная группа'])
开发者ID:LihMeh,项目名称:outwiker,代码行数:14,代码来源:iconscollection.py

示例3: testRenameGroup_04_self

# 需要导入模块: from outwiker.core.iconscollection import IconsCollection [as 别名]
# 或者: from outwiker.core.iconscollection.IconsCollection import renameGroup [as 别名]
    def testRenameGroup_04_self(self):
        files = ['new.png', 'image_01.JPG']
        fullPaths = [os.path.join(self.imagesDir, fname) for fname in files]
        os.mkdir(self.tempDir1)

        collection = IconsCollection(self.tempDir1)
        collection.addGroup('Новая группа')
        collection.addIcons('Новая группа', fullPaths)

        collection.renameGroup('Новая группа', 'Новая группа')
        self.assertEqual(collection.getGroups(), ['Новая группа'])
        self.assertEqual(len(collection.getIcons('Новая группа')), 2)

        newcollection = IconsCollection(self.tempDir1)
        self.assertEqual(newcollection.getGroups(), ['Новая группа'])
        self.assertEqual(len(newcollection.getIcons('Новая группа')), 2)
开发者ID:Jenyay,项目名称:outwiker,代码行数:18,代码来源:test_iconscollection.py


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