Remove no longer needed index function
This commit is contained in:
@@ -520,14 +520,6 @@ class NWIndex:
|
|||||||
hCount[iLevel] += 1
|
hCount[iLevel] += 1
|
||||||
return hCount
|
return hCount
|
||||||
|
|
||||||
def getHandleWordCounts(self, tHandle):
|
|
||||||
"""Get all header word counts for a specific handle.
|
|
||||||
"""
|
|
||||||
return [
|
|
||||||
(f"{tHandle}:{sTitle}", hItem.wordCount)
|
|
||||||
for sTitle, hItem in self._itemIndex.iterItemHeaders(tHandle)
|
|
||||||
]
|
|
||||||
|
|
||||||
def getHandleHeaderCount(self, tHandle):
|
def getHandleHeaderCount(self, tHandle):
|
||||||
"""Get the number of headers in an item.
|
"""Get the number of headers in an item.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -775,16 +775,6 @@ def testCoreIndex_ExtractData(mockGUI, fncPath, mockRnd):
|
|||||||
(f"{nHandle}:T0002", 1, "Hello World!", 22),
|
(f"{nHandle}:T0002", 1, "Hello World!", 22),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Header Word Counts
|
|
||||||
bHandle = "0000000000000"
|
|
||||||
assert theIndex.getHandleWordCounts(bHandle) == []
|
|
||||||
assert theIndex.getHandleWordCounts(hHandle) == [("%s:T0001" % hHandle, 2)]
|
|
||||||
assert theIndex.getHandleWordCounts(sHandle) == [("%s:T0001" % sHandle, 2)]
|
|
||||||
assert theIndex.getHandleWordCounts(tHandle) == [("%s:T0001" % tHandle, 2)]
|
|
||||||
assert theIndex.getHandleWordCounts(nHandle) == [
|
|
||||||
(f"{nHandle}:T0001", 12), (f"{nHandle}:T0002", 16)
|
|
||||||
]
|
|
||||||
|
|
||||||
assert theIndex.saveIndex() is True
|
assert theIndex.saveIndex() is True
|
||||||
assert theProject.saveProject() is True
|
assert theProject.saveProject() is True
|
||||||
assert theProject.closeProject() is True
|
assert theProject.closeProject() is True
|
||||||
|
|||||||
Reference in New Issue
Block a user