Fixed test
This commit is contained in:
+4
-1
@@ -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):
|
||||
|
||||
@@ -37,6 +37,7 @@ backuponclose = False
|
||||
askbeforebackup = True
|
||||
|
||||
[Path]
|
||||
lastpath =
|
||||
recent0 =
|
||||
recent1 =
|
||||
recent2 =
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user