Update current tests
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ def resetConfigVars():
|
||||
"""Reset the CONFIG object and set various values for testing to
|
||||
prevent interfering with local OS.
|
||||
"""
|
||||
CONFIG.setLastPath(_TMP_ROOT)
|
||||
# CONFIG.setLastPath(_TMP_ROOT)
|
||||
CONFIG.setBackupPath(_TMP_ROOT)
|
||||
CONFIG.setGuiFont(None)
|
||||
CONFIG.setTextFont(None)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Meta]
|
||||
timestamp = 2024-05-20 16:48:20
|
||||
timestamp = 2024-06-16 00:36:27
|
||||
|
||||
[Main]
|
||||
font =
|
||||
@@ -10,7 +10,6 @@ hidevscroll = False
|
||||
hidehscroll = False
|
||||
lastnotes = 0x0
|
||||
nativefont = True
|
||||
lastpath =
|
||||
|
||||
[Sizes]
|
||||
mainwindow = 1200, 650
|
||||
|
||||
@@ -213,21 +213,21 @@ def testBaseConfig_Methods(fncPath):
|
||||
assert tstConf.assetPath("stuff") == appPath / "assets" / "stuff"
|
||||
|
||||
# Last Path
|
||||
assert tstConf.lastPath() == Path.home().absolute()
|
||||
assert tstConf.lastPath("project") == Path.home().absolute()
|
||||
|
||||
tmpStuff = fncPath / "stuff"
|
||||
tmpStuff.mkdir()
|
||||
tstConf.setLastPath(tmpStuff)
|
||||
assert tstConf.lastPath() == tmpStuff
|
||||
tstConf.setLastPath("project", tmpStuff)
|
||||
assert tstConf.lastPath("project") == tmpStuff
|
||||
|
||||
fileStuff = tmpStuff / "more_stuff.txt"
|
||||
fileStuff.write_text("Stuff")
|
||||
tstConf.setLastPath(fileStuff)
|
||||
assert tstConf.lastPath() == tmpStuff
|
||||
tstConf.setLastPath("project", fileStuff)
|
||||
assert tstConf.lastPath("project") == tmpStuff
|
||||
|
||||
fileStuff.unlink()
|
||||
tmpStuff.rmdir()
|
||||
assert tstConf.lastPath() == Path.home().absolute()
|
||||
assert tstConf.lastPath("project") == Path.home().absolute()
|
||||
|
||||
# Backup Path
|
||||
assert tstConf.backupPath() == tstConf._backPath
|
||||
|
||||
Reference in New Issue
Block a user