Generalise heading comments
This commit is contained in:
@@ -1196,7 +1196,7 @@ def testCoreIndex_ItemIndex(nwGUI, fncPath, mockRnd):
|
||||
|
||||
# Set the remaining data values
|
||||
itemIndex.setHeadingCounts(cHandle, "T0001", 60, 10, 2)
|
||||
itemIndex.setHeadingSynopsis(cHandle, "T0001", "In the beginning ...")
|
||||
itemIndex.setHeadingComment(cHandle, "T0001", nwComment.SYNOPSIS, "", "In the beginning ...")
|
||||
itemIndex.setHeadingTag(cHandle, "T0001", "One")
|
||||
itemIndex.addHeadingRef(cHandle, "T0001", ["Jane"], "@pov")
|
||||
itemIndex.addHeadingRef(cHandle, "T0001", ["Jane"], "@focus")
|
||||
|
||||
@@ -27,6 +27,7 @@ from novelwriter.core.index import TagsIndex
|
||||
from novelwriter.core.indexdata import IndexHeading, IndexNode
|
||||
from novelwriter.core.item import NWItem
|
||||
from novelwriter.core.project import NWProject
|
||||
from novelwriter.enum import nwComment
|
||||
|
||||
|
||||
@pytest.mark.core
|
||||
@@ -74,8 +75,8 @@ def testCoreIndexData_IndexNode(mockGUI):
|
||||
assert head2.paraCount == 6
|
||||
|
||||
# Set synopsis
|
||||
node.setHeadingSynopsis("T0001", "The first")
|
||||
node.setHeadingSynopsis("T0002", "The second")
|
||||
node.setHeadingComment("T0001", nwComment.SYNOPSIS, "", "The first")
|
||||
node.setHeadingComment("T0002", nwComment.SYNOPSIS, "", "The second")
|
||||
assert head1.synopsis == "The first"
|
||||
assert head2.synopsis == "The second"
|
||||
|
||||
@@ -213,7 +214,7 @@ def testCoreIndexData_IndexHeading():
|
||||
assert head.mainCount == 42
|
||||
|
||||
# Set Summary
|
||||
head.setSynopsis("In the beginning ...")
|
||||
head.setComment(nwComment.SYNOPSIS, "", "In the beginning ...")
|
||||
assert head.synopsis == "In the beginning ..."
|
||||
|
||||
# Set Tag
|
||||
|
||||
Reference in New Issue
Block a user