Be a bit more precise on open project errors (#1737)

This commit is contained in:
Veronica Berglyd Olsen
2024-03-09 12:12:19 +01:00
parent 02f20b7a4f
commit 075a9bf850
2 changed files with 12 additions and 5 deletions
+4 -1
View File
@@ -111,12 +111,15 @@ def testCoreStorage_InitProjectStorage(mockGUI, fncPath, mockRnd):
buildTestProject(project, fncPath)
# Init with the wrong file
foo = fncPath / "foobar.txt"
foo.touch()
assert storage.initProjectStorage(fncPath / "foobar.txt") == NWStorageOpen.UNKOWN
foo.unlink()
storage._clearLockFile()
storage.clear()
# Init with the user's home dir
assert storage.initProjectStorage(Path.home()) == NWStorageOpen.UNKOWN
assert storage.initProjectStorage(Path.home()) == NWStorageOpen.NOT_FOUND
storage._clearLockFile()
storage.clear()