diff --git a/nw/__init__.py b/nw/__init__.py index eca0e5ee..8419dd81 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -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") diff --git a/tests/test_dialogs.py b/tests/test_dialogs.py index a71653ee..9fa4c531 100644 --- a/tests/test_dialogs.py +++ b/tests/test_dialogs.py @@ -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