A couple of fixes to tests breaking on windows and mac

This commit is contained in:
Veronica K. B. Olsen
2020-10-01 20:44:52 +02:00
parent 26ebcd496d
commit f1d8265a02
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ def main(sysArgs=None):
if not logFile == "" and toFile:
if os.path.isfile(logFile+".bak"):
os.remove(logFile+".bak")
os.unlink(logFile+".bak")
if os.path.isfile(logFile):
os.rename(logFile, logFile+".bak")
+8 -4
View File
@@ -540,12 +540,16 @@ def testBuildTool(qtbot, yesToAll, nwTempBuild, nwLipsum, nwRef, nwTemp):
# We assume the export itself by the Qt library works, so we just
# check that novelWriter successfully writes the files.
assert nwBuild._saveDocument(nwBuild.FMT_ODT)
assert nwBuild._saveDocument(nwBuild.FMT_PDF)
assert nwBuild._saveDocument(nwBuild.FMT_MD)
assert nwBuild._saveDocument(nwBuild.FMT_TXT)
assert os.path.isfile(os.path.join(nwLipsum, "Lorem Ipsum.odt"))
assert os.path.isfile(os.path.join(nwLipsum, "Lorem Ipsum.pdf"))
if not nwGUI.mainConf.osDarwin:
assert nwBuild._saveDocument(nwBuild.FMT_PDF)
assert os.path.isfile(os.path.join(nwLipsum, "Lorem Ipsum.pdf"))
assert nwBuild._saveDocument(nwBuild.FMT_MD)
assert os.path.isfile(os.path.join(nwLipsum, "Lorem Ipsum.md"))
assert nwBuild._saveDocument(nwBuild.FMT_TXT)
assert os.path.isfile(os.path.join(nwLipsum, "Lorem Ipsum.txt"))
# Close the build tool