Annotate index class and change file format slightly to match others
This commit is contained in:
+246
-269
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"tagsIndex": {
|
||||
"novelWriter.tagsIndex": {
|
||||
"Bod": {"handle": "4c4f28287af27", "heading": "T0001", "class": "CHARACTER"},
|
||||
"Main": {"handle": "2426c6f0ca922", "heading": "T0001", "class": "PLOT"},
|
||||
"Europe": {"handle": "04468803b92e1", "heading": "T0001", "class": "WORLD"}
|
||||
},
|
||||
"itemIndex": {
|
||||
"novelWriter.itemIndex": {
|
||||
"7a992350f3eb6": {
|
||||
"headings": {
|
||||
"T0001": {"level": "H1", "title": "Lorem Ipsum", "line": 1, "tag": "", "cCount": 230, "wCount": 40, "pCount": 3, "synopsis": ""}
|
||||
|
||||
@@ -125,7 +125,7 @@ def testCoreIndex_LoadSave(monkeypatch, prjLipsum, mockGUI, tstPaths):
|
||||
assert theIndex.indexBroken is True
|
||||
|
||||
# Write an index file that passes loading, but is still empty
|
||||
writeFile(projFile, '{"tagsIndex": {}, "itemIndex": {}}')
|
||||
writeFile(projFile, '{"novelWriter.tagsIndex": {}, "novelWriter.itemIndex": {}}')
|
||||
assert theIndex.loadIndex() is True
|
||||
assert theIndex.indexBroken is False
|
||||
|
||||
@@ -1071,13 +1071,13 @@ def testCoreIndex_ItemIndex(mockGUI, fncPath, mockRnd):
|
||||
assert nStruct[3][0] == uHandle
|
||||
|
||||
# Novel structure with root handle set
|
||||
nStruct = list(itemIndex.iterNovelStructure(rootHandle=C.hNovelRoot))
|
||||
nStruct = list(itemIndex.iterNovelStructure(rHandle=C.hNovelRoot))
|
||||
assert len(nStruct) == 3
|
||||
assert nStruct[0][0] == nHandle
|
||||
assert nStruct[1][0] == cHandle
|
||||
assert nStruct[2][0] == sHandle
|
||||
|
||||
nStruct = list(itemIndex.iterNovelStructure(rootHandle=mHandle))
|
||||
nStruct = list(itemIndex.iterNovelStructure(rHandle=mHandle))
|
||||
assert len(nStruct) == 1
|
||||
assert nStruct[0][0] == uHandle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user