本文整理汇总了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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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