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


Python Menu.folder方法代码示例

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


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

示例1: test_back_multiLevel

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_back_multiLevel():
    menu = Menu(mainFolder)
    menu.moveBy(1).select().moveBy(1).select()
    menu.back()
    assert menu.folder() is folder2
    assert menu.item() is folder2b
    menu.back()
    assert menu.folder() is mainFolder
    assert menu.item() is folder2
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:11,代码来源:menu_test.py

示例2: test_mainFolder_shouldReturnCurrentMainFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_mainFolder_shouldReturnCurrentMainFolder():
    menu = Menu(mainFolder)
    menu.select()
    assert menu.folder() is folder1
    assert menu.mainFolder() is folder1
    menu.select()
    assert menu.folder() is folder1a
    assert menu.mainFolder() is folder1
    menu.back().back()
    assert menu.mainFolder() is None
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:12,代码来源:menu_test.py

示例3: test_reset_shouldGoToFirstItemOfMainFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_reset_shouldGoToFirstItemOfMainFolder():
    menu = Menu(mainFolder)
    menu.moveBy(1).select().moveBy(1).select()
    menu.reset()
    assert menu.folder() is mainFolder
    assert menu.item() is folder1
    assert len(menu._menuStack) == 0
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:9,代码来源:menu_test.py

示例4: test_moveDoesNotChangeTheFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_moveDoesNotChangeTheFolder():
    menu = Menu(mainFolder)
    menu.moveBy(1)
    assert menu.folder() is mainFolder
    assert menu.isRoot() is True
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:7,代码来源:menu_test.py

示例5: test_updateItemsForFolder_shouldDoNothingForDifferentFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_updateItemsForFolder_shouldDoNothingForDifferentFolder():
    menu = Menu(mainFolder)
    menu._updateItemsForFolder(folder2, folder2.items(), 0, False)
    assert menu.folder() is mainFolder
    assert menu.item() is folder1
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:7,代码来源:menu_test.py

示例6: test_back_shouldDoNothingForRootFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_back_shouldDoNothingForRootFolder():
    menu = Menu(mainFolder)
    menu.back().back()
    assert menu.folder() is mainFolder
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:6,代码来源:menu_test.py

示例7: test_back

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_back():
    menu = Menu(mainFolder)
    menu.select()
    menu.back()
    assert menu.folder() is mainFolder
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:7,代码来源:menu_test.py

示例8: test_init

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_init():
    menu = Menu(mainFolder)
    assert menu.folder() is mainFolder
    assert menu.item() is folder1
    assert menu.isRoot() is True
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:7,代码来源:menu_test.py

示例9: test_select_multiLevel

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_select_multiLevel():
    menu = Menu(mainFolder)
    menu.moveBy(1).select().moveBy(1).select()
    assert menu.folder() is folder2b
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:6,代码来源:menu_test.py

示例10: test_select_shouldOpenFolderAndShowItsFirstEntry

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_select_shouldOpenFolderAndShowItsFirstEntry():
    menu = Menu(mainFolder)
    menu.moveBy(1)
    menu.select()
    assert menu.folder() is folder2
    assert menu.item() is folder2a
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:8,代码来源:menu_test.py

示例11: test_select_shouldOpenFolder

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import folder [as 别名]
def test_select_shouldOpenFolder():
    menu = Menu(mainFolder)
    menu.select()
    assert menu.folder() is folder1
开发者ID:spielzeugland,项目名称:kodi-control-panel,代码行数:6,代码来源:menu_test.py


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