Add some type and layout checker functions to the item class

This commit is contained in:
Veronica Berglyd Olsen
2022-09-11 17:04:21 +02:00
parent f14398392a
commit 01b66bc62e
2 changed files with 35 additions and 11 deletions
+5
View File
@@ -203,12 +203,16 @@ def testCoreItem_Methods(mockGUI):
theItem.setType("ROOT")
assert theItem.describeMe() == "Root Folder"
assert theItem.isRootType() is True
theItem.setType("FOLDER")
assert theItem.describeMe() == "Folder"
assert theItem.isFolderType() is True
theItem.setType("FILE")
theItem.setLayout("DOCUMENT")
assert theItem.isFileType() is True
assert theItem.isDocumentLayout() is True
assert theItem.describeMe() == "Novel Document"
assert theItem.describeMe("H0") == "Novel Document"
assert theItem.describeMe("H1") == "Novel Title Page"
@@ -217,6 +221,7 @@ def testCoreItem_Methods(mockGUI):
assert theItem.describeMe("H4") == "Novel Document"
theItem.setLayout("NOTE")
assert theItem.isNoteLayout() is True
assert theItem.describeMe() == "Project Note"
# Status + Icon