Fix tests
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="1.3a0" hexVersion="0x010300a0" fileVersion="1.2" timeStamp="2021-02-18 12:55:23">
|
||||
<novelWriterXML appVersion="1.3a0" hexVersion="0x010300a0" fileVersion="1.2" timeStamp="2021-02-18 20:34:04">
|
||||
<project>
|
||||
<name>Sample Project</name>
|
||||
<title>Sample Project</title>
|
||||
<author>Jane Smith</author>
|
||||
<author>Jay Doh</author>
|
||||
<saveCount>1022</saveCount>
|
||||
<autoCount>161</autoCount>
|
||||
<editTime>48346</editTime>
|
||||
<saveCount>1054</saveCount>
|
||||
<autoCount>166</autoCount>
|
||||
<editTime>49435</editTime>
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>False</doBackup>
|
||||
<language>None</language>
|
||||
<language>en</language>
|
||||
<spellCheck>True</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
@@ -27,7 +27,7 @@
|
||||
</autoReplace>
|
||||
<titleFormat>
|
||||
<title>%title%</title>
|
||||
<chapter>Chapter %ch%: %title%</chapter>
|
||||
<chapter>Chapter %chw%: %title%</chapter>
|
||||
<unnumbered>%title%</unnumbered>
|
||||
<scene>Scene %ch%.%sc%: %title%</scene>
|
||||
<section></section>
|
||||
@@ -121,7 +121,7 @@
|
||||
<charCount>1810</charCount>
|
||||
<wordCount>318</wordCount>
|
||||
<paraCount>8</paraCount>
|
||||
<cursorPos>1112</cursorPos>
|
||||
<cursorPos>1505</cursorPos>
|
||||
</item>
|
||||
<item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a">
|
||||
<name>Another Scene</name>
|
||||
|
||||
@@ -118,6 +118,7 @@ def tmpConf(tmpDir):
|
||||
theConf = Config()
|
||||
theConf.initConfig(tmpDir, tmpDir)
|
||||
theConf.setLastPath("")
|
||||
theConf.guiLang = "en_GB"
|
||||
return theConf
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
@@ -130,6 +131,7 @@ def fncConf(fncDir):
|
||||
theConf = Config()
|
||||
theConf.initConfig(fncDir, fncDir)
|
||||
theConf.setLastPath("")
|
||||
theConf.guiLang = "en_GB"
|
||||
return theConf
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>True</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>None</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
<language>None</language>
|
||||
<language>en_GB</language>
|
||||
<spellCheck>False</spellCheck>
|
||||
<spellLang>en</spellLang>
|
||||
<autoOutline>True</autoOutline>
|
||||
|
||||
@@ -197,7 +197,7 @@ def testBaseConfig_Init(monkeypatch, tmpDir, fncDir, outDir, refDir, filesDir):
|
||||
|
||||
tstApp = DummyApp()
|
||||
tstConf.initLocalisation(tstApp)
|
||||
theList = tstConf.listLanguages()
|
||||
theList = tstConf.listLanguages(tstConf.LANG_NW)
|
||||
assert theList == [("en_GB", "British English")]
|
||||
|
||||
copyfile(confFile, testFile)
|
||||
|
||||
@@ -117,7 +117,8 @@ def testCoreToken_TextOps(monkeypatch, nwMinimal, dummyGUI):
|
||||
"""
|
||||
theProject = NWProject(dummyGUI)
|
||||
theProject.projTree.setSeed(42)
|
||||
theProject.loadProjectLocalisation("en")
|
||||
theProject.projLang = "en"
|
||||
theProject._loadProjectLocalisation()
|
||||
|
||||
theToken = Tokenizer(theProject, dummyGUI)
|
||||
theToken.setKeepMarkdown(True)
|
||||
@@ -414,7 +415,8 @@ def testCoreToken_Headers(dummyGUI):
|
||||
"""Test the header and page parser of the Tokenizer class.
|
||||
"""
|
||||
theProject = NWProject(dummyGUI)
|
||||
theProject.loadProjectLocalisation("en")
|
||||
theProject.projLang = "en"
|
||||
theProject._loadProjectLocalisation()
|
||||
theToken = Tokenizer(theProject, dummyGUI)
|
||||
|
||||
# Nothing
|
||||
|
||||
Reference in New Issue
Block a user