Fixed test

This commit is contained in:
Veronica K. B. Olsen
2019-10-23 21:34:25 +02:00
parent 9186289c1b
commit dc12d518c0
3 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -317,7 +317,10 @@ class Config:
return True
def setLastPath(self, lastPath):
self.lastPath = path.dirname(lastPath)
if lastPath is None or lastPath == "":
self.lastPath = ""
else:
self.lastPath = path.dirname(lastPath)
return True
def setWinSize(self, newWidth, newHeight):
+1
View File
@@ -37,6 +37,7 @@ backuponclose = False
askbeforebackup = True
[Path]
lastpath =
recent0 =
recent1 =
recent2 =
+2
View File
@@ -14,6 +14,8 @@ def testConfigInit(nwTemp,nwRef):
tmpConf = path.join(nwTemp,"novelwriter.conf")
refConf = path.join(nwRef, "novelwriter.conf")
assert theConf.initConfig(nwTemp)
assert theConf.setLastPath("")
assert theConf.saveConfig()
assert cmpFiles(tmpConf, refConf, [2])
assert not theConf.confChanged