diff --git a/tests/reference/proj/1_nwProject.nwx b/tests/reference/proj/1_nwProject.nwx index 12697dbe..0c891d8b 100644 --- a/tests/reference/proj/1_nwProject.nwx +++ b/tests/reference/proj/1_nwProject.nwx @@ -1,10 +1,10 @@ - + New Project 1 - 0 + 1 0 @@ -37,7 +37,7 @@ Main - + Novel ROOT @@ -46,16 +46,16 @@ False - Characters + Plot ROOT - CHARACTER + PLOT New False - Plot + Characters ROOT - PLOT + CHARACTER New False @@ -67,13 +67,37 @@ False + Title Page + FILE + NOVEL + New + True + TITLE + 0 + 0 + 0 + 0 + + New Chapter FOLDER NOVEL New False - + + New Chapter + FILE + NOVEL + New + True + CHAPTER + 0 + 0 + 0 + 0 + + New Scene FILE NOVEL diff --git a/tests/reference/proj/2_nwProject.nwx b/tests/reference/proj/2_nwProject.nwx index ed6bbbe4..fd73b637 100644 --- a/tests/reference/proj/2_nwProject.nwx +++ b/tests/reference/proj/2_nwProject.nwx @@ -1,10 +1,10 @@ - + New Project 4 - 0 + 1 0 @@ -37,7 +37,7 @@ Main - + Novel ROOT @@ -46,16 +46,16 @@ False - Characters + Plot ROOT - CHARACTER + PLOT New False - Plot + Characters ROOT - PLOT + CHARACTER New False @@ -67,13 +67,37 @@ False + Title Page + FILE + NOVEL + New + True + TITLE + 0 + 0 + 0 + 0 + + New Chapter FOLDER NOVEL New False - + + New Chapter + FILE + NOVEL + New + True + CHAPTER + 0 + 0 + 0 + 0 + + New Scene FILE NOVEL @@ -85,28 +109,28 @@ 0 0 - + Timeline ROOT TIMELINE New False - + Object ROOT OBJECT New False - + Custom1 ROOT CUSTOM New False - + Custom2 ROOT CUSTOM diff --git a/tests/reference/proj/3_nwProject.nwx b/tests/reference/proj/3_nwProject.nwx index 58bef95d..0c396343 100644 --- a/tests/reference/proj/3_nwProject.nwx +++ b/tests/reference/proj/3_nwProject.nwx @@ -1,10 +1,10 @@ - + New Project 5 - 0 + 1 0 @@ -37,7 +37,7 @@ Main - + Novel ROOT @@ -46,16 +46,16 @@ False - Characters + Plot ROOT - CHARACTER + PLOT New False - Plot + Characters ROOT - PLOT + CHARACTER New False @@ -67,13 +67,37 @@ False + Title Page + FILE + NOVEL + New + True + TITLE + 0 + 0 + 0 + 0 + + New Chapter FOLDER NOVEL New False - + + New Chapter + FILE + NOVEL + New + True + CHAPTER + 0 + 0 + 0 + 0 + + New Scene FILE NOVEL @@ -85,35 +109,35 @@ 0 0 - + Timeline ROOT TIMELINE New False - + Object ROOT OBJECT New False - + Custom1 ROOT CUSTOM New False - + Custom2 ROOT CUSTOM New False - + Hello FILE NOVEL @@ -125,7 +149,7 @@ 0 0 - + Jane FILE CHARACTER diff --git a/tests/test_project.py b/tests/test_project.py index 9baa2c4b..8f35e35f 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -82,7 +82,7 @@ def testProjectNewFile(nwTempProj,nwRef): refFile = path.join(nwRef,"proj","3_nwProject.nwx") assert theProject.openProject(projFile) assert isinstance(theProject.newFile("Hello", nwItemClass.NOVEL, "73475cb40a568"), str) - assert isinstance(theProject.newFile("Jane", nwItemClass.CHARACTER, "44cb730c42048"), str) + assert isinstance(theProject.newFile("Jane", nwItemClass.CHARACTER, "71ee45a3c0db9"), str) assert theProject.projChanged assert theProject.saveProject() assert theProject.closeProject() @@ -142,9 +142,9 @@ def testIndexCheckThese(nwTempProj): assert theProject.openProject(projFile) theIndex = NWIndex(theProject, theMain) - nHandle = "41cfc0d1f2d12" + nHandle = "0e17daca5f3e1" nItem = theProject.projTree[nHandle] - cHandle = "2858dcd1057d3" + cHandle = "02d20bbd7e394" cItem = theProject.projTree[cHandle] assert theIndex.scanText(cHandle, ( @@ -155,7 +155,7 @@ def testIndexCheckThese(nwTempProj): "# Hello World!\n" "@pov: Jane" )) - assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER', 'T000001']}" + assert str(theIndex.tagIndex) == "{'Jane': [2, '02d20bbd7e394', 'CHARACTER', 'T000001']}" assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!" assert str(theIndex.checkThese(["@tag", "Jane"], cItem)) == "[True, True]" @@ -175,9 +175,9 @@ def testIndexMeta(nwTempProj): assert theProject.openProject(projFile) theIndex = NWIndex(theProject, theMain) - nHandle = "41cfc0d1f2d12" + nHandle = "0e17daca5f3e1" nItem = theProject.projTree[nHandle] - cHandle = "2858dcd1057d3" + cHandle = "02d20bbd7e394" cItem = theProject.projTree[cHandle] assert theIndex.scanText(cHandle, ( @@ -195,11 +195,11 @@ def testIndexMeta(nwTempProj): "\n" "Well, not really.\n" )) - assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER', 'T000001']}" + assert str(theIndex.tagIndex) == "{'Jane': [2, '02d20bbd7e394', 'CHARACTER', 'T000001']}" assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!" # The novel structure should contain the pointer to the novel file header - assert str(theIndex.getNovelStructure()) == "['41cfc0d1f2d12:T000001']" + assert str(theIndex.getNovelStructure()) == "['0e17daca5f3e1:T000001']" # The novel file should have the correct counts cC, wC, pC = theIndex.getCounts(nHandle) @@ -214,6 +214,6 @@ def testIndexMeta(nwTempProj): # The character file should have a record of the reference from the novel file theRefs = theIndex.getBackReferenceList(cHandle) - assert str(theRefs) == "{'41cfc0d1f2d12': 'T000001'}" + assert str(theRefs) == "{'0e17daca5f3e1': 'T000001'}" assert theProject.closeProject()