Change lastPath to a Path object

This commit is contained in:
Veronica Berglyd Olsen
2022-11-09 18:21:40 +01:00
parent 9d3291aba6
commit 47b57172eb
13 changed files with 45 additions and 71 deletions
+2 -2
View File
@@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import pytest
from shutil import copyfile
from tools import cmpFiles, getGuiItem
from PyQt5.QtCore import Qt
@@ -215,7 +216,6 @@ def testDlgPreferences_Main(qtbot, monkeypatch, nwGUI, fncPath, tstPaths):
nwPrefs._doClose()
assert theConf.confChanged
theConf.lastPath = ""
assert nwGUI.mainConf.saveConfig()
projFile = fncPath / "novelwriter.conf"
@@ -225,7 +225,7 @@ def testDlgPreferences_Main(qtbot, monkeypatch, nwGUI, fncPath, tstPaths):
ignTuple = (
"timestamp", "guifont", "lastnotes", "guilang", "geometry",
"preferences", "projcols", "mainpane", "docpane", "viewpane",
"outlinepane", "textfont", "textsize"
"outlinepane", "textfont", "textsize", "lastpath"
)
assert cmpFiles(testFile, compFile, ignoreStart=ignTuple)
@@ -38,7 +38,6 @@ def testDlgProjDetails_Dialog(qtbot, nwGUI, nwLipsum):
qtbot.wait(100)
# Open the Writing Stats dialog
nwGUI.mainConf.lastPath = ""
nwGUI.mainMenu.aProjectDetails.activate(QAction.Trigger)
qtbot.waitUntil(lambda: getGuiItem("GuiProjectDetails") is not None, timeout=1000)