Fixed tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="0.6.1" hexVersion="0x000601f0" fileVersion="1.0" saveCount="182" autoCount="34" timeStamp="2020-05-25 21:08:45">
|
<novelWriterXML appVersion="0.6.1" hexVersion="0x000601f0" fileVersion="1.0" saveCount="192" autoCount="36" timeStamp="2020-05-25 23:29:01">
|
||||||
<project>
|
<project>
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<spellCheck>True</spellCheck>
|
<spellCheck>True</spellCheck>
|
||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>ae7339df26ded</lastEdited>
|
<lastEdited>ae7339df26ded</lastEdited>
|
||||||
<lastViewed>ae7339df26ded</lastViewed>
|
<lastViewed>bb2c23b3c42cc</lastViewed>
|
||||||
<lastWordCount>941</lastWordCount>
|
<lastWordCount>941</lastWordCount>
|
||||||
<autoReplace>
|
<autoReplace>
|
||||||
<A>B</A>
|
<A>B</A>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ def testIndexCheckThese(nwTempProj):
|
|||||||
"# Hello World!\n"
|
"# Hello World!\n"
|
||||||
"@pov: Jane"
|
"@pov: Jane"
|
||||||
))
|
))
|
||||||
assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER']}"
|
assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER', 'T000001']}"
|
||||||
assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!"
|
assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!"
|
||||||
|
|
||||||
assert str(theIndex.checkThese(["@tag", "Jane"], cItem)) == "[True, True]"
|
assert str(theIndex.checkThese(["@tag", "Jane"], cItem)) == "[True, True]"
|
||||||
@@ -195,7 +195,7 @@ def testIndexMeta(nwTempProj):
|
|||||||
"\n"
|
"\n"
|
||||||
"Well, not really.\n"
|
"Well, not really.\n"
|
||||||
))
|
))
|
||||||
assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER']}"
|
assert str(theIndex.tagIndex) == "{'Jane': [2, '2858dcd1057d3', 'CHARACTER', 'T000001']}"
|
||||||
assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!"
|
assert theIndex.novelIndex[nHandle]["T000001"]["title"] == "Hello World!"
|
||||||
|
|
||||||
# The novel structure should contain the pointer to the novel file header
|
# The novel structure should contain the pointer to the novel file header
|
||||||
@@ -214,6 +214,6 @@ def testIndexMeta(nwTempProj):
|
|||||||
|
|
||||||
# The character file should have a record of the reference from the novel file
|
# The character file should have a record of the reference from the novel file
|
||||||
theRefs = theIndex.getBackReferenceList(cHandle)
|
theRefs = theIndex.getBackReferenceList(cHandle)
|
||||||
assert str(theRefs) == "{'41cfc0d1f2d12': 3}"
|
assert str(theRefs) == "{'41cfc0d1f2d12': 'T000001'}"
|
||||||
|
|
||||||
assert theProject.closeProject()
|
assert theProject.closeProject()
|
||||||
|
|||||||
Reference in New Issue
Block a user