Fix tests
This commit is contained in:
@@ -25,7 +25,6 @@ import pytest
|
||||
from tools import readFile
|
||||
|
||||
from novelwriter.core import NWProject, ToHtml
|
||||
from novelwriter.core.index import NWIndex
|
||||
|
||||
|
||||
@pytest.mark.core
|
||||
@@ -33,7 +32,6 @@ def testCoreToHtml_ConvertFormat(mockGUI):
|
||||
"""Test the tokenizer and converter chain using the ToHtml class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theHtml = ToHtml(theProject)
|
||||
|
||||
# Novel Files Headers
|
||||
@@ -236,7 +234,6 @@ def testCoreToHtml_ConvertDirect(mockGUI):
|
||||
"""Test the converter directly using the ToHtml class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theHtml = ToHtml(theProject)
|
||||
|
||||
theHtml._isNovel = True
|
||||
@@ -607,7 +604,6 @@ def testCoreToHtml_Format(mockGUI):
|
||||
"""Test all the formatters for the ToHtml class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theHtml = ToHtml(theProject)
|
||||
|
||||
# Export Mode
|
||||
|
||||
@@ -25,7 +25,6 @@ import pytest
|
||||
from tools import readFile
|
||||
|
||||
from novelwriter.core import NWProject, ToMarkdown
|
||||
from novelwriter.core.index import NWIndex
|
||||
|
||||
|
||||
@pytest.mark.core
|
||||
@@ -33,7 +32,6 @@ def testCoreToMarkdown_ConvertFormat(mockGUI):
|
||||
"""Test the tokenizer and converter chain using the ToMarkdown class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theMD = ToMarkdown(theProject)
|
||||
|
||||
# Headers
|
||||
@@ -162,7 +160,6 @@ def testCoreToMarkdown_ConvertDirect(mockGUI):
|
||||
"""Test the converter directly using the ToMarkdown class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theMD = ToMarkdown(theProject)
|
||||
|
||||
theMD._isNovel = True
|
||||
@@ -267,7 +264,6 @@ def testCoreToMarkdown_Format(mockGUI):
|
||||
"""Test all the formatters for the ToMarkdown class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theMD = ToMarkdown(theProject)
|
||||
|
||||
assert theMD._formatKeywords("", theMD.A_NONE) == ""
|
||||
|
||||
@@ -29,7 +29,6 @@ from shutil import copyfile
|
||||
from tools import cmpFiles
|
||||
|
||||
from novelwriter.core import NWProject, ToOdt
|
||||
from novelwriter.core.index import NWIndex
|
||||
from novelwriter.core.toodt import ODTParagraphStyle, ODTTextStyle, XMLParagraph, _mkTag
|
||||
|
||||
XML_NS = [
|
||||
@@ -56,7 +55,6 @@ def testCoreToOdt_Init(mockGUI):
|
||||
"""Test initialisation of the ODT document.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
|
||||
# Flat Doc
|
||||
# ========
|
||||
@@ -112,7 +110,6 @@ def testCoreToOdt_TextFormatting(mockGUI):
|
||||
"""Test formatting of paragraphs.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
|
||||
theDoc.initDocument()
|
||||
@@ -234,7 +231,6 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
"""Test the converter of the ToOdt class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
|
||||
theDoc._isNovel = True
|
||||
@@ -566,7 +562,6 @@ def testCoreToOdt_ConvertDirect(mockGUI):
|
||||
otherwise hard to reach conditions.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
|
||||
theDoc._isNovel = True
|
||||
@@ -621,7 +616,6 @@ def testCoreToOdt_SaveFlat(mockGUI, fncDir, outDir, refDir):
|
||||
"""Test the document save functions.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
theDoc._isNovel = True
|
||||
@@ -658,7 +652,6 @@ def testCoreToOdt_SaveFull(mockGUI, fncDir, outDir, refDir):
|
||||
"""Test the document save functions.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
|
||||
theDoc = ToOdt(theProject, isFlat=False)
|
||||
theDoc._isNovel = True
|
||||
@@ -738,7 +731,6 @@ def testCoreToOdt_Format(mockGUI):
|
||||
"""Test the formatters for the ToOdt class.
|
||||
"""
|
||||
theProject = NWProject(mockGUI)
|
||||
mockGUI.theIndex = NWIndex(theProject)
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
|
||||
assert theDoc._formatSynopsis("synopsis text") == (
|
||||
|
||||
@@ -88,7 +88,7 @@ def testGuiOutline_Main(qtbot, monkeypatch, nwGUI, nwLipsum):
|
||||
|
||||
# Click POV Link
|
||||
assert outlineData.povKeyValue.text() == "<a href='Bod'>Bod</a>"
|
||||
outlineData._tagClicked("#pov=Bod")
|
||||
nwGUI.projView._tagClicked("Bod")
|
||||
assert nwGUI.docViewer.docHandle() == "4c4f28287af27"
|
||||
|
||||
# Scene One, Section Two
|
||||
|
||||
Reference in New Issue
Block a user