Merge branch 'main' into dev
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -141,11 +141,12 @@ def testGuiTheme_Theme(qtbot, monkeypatch, nwGUI):
|
||||
mp.setattr("builtins.open", causeOSError)
|
||||
assert mainTheme.listThemes() == []
|
||||
|
||||
# Load the theme info
|
||||
# Load the theme info, default themes first
|
||||
themesList = mainTheme.listThemes()
|
||||
assert themesList[0] == ("default_dark", "Default Dark Theme")
|
||||
assert themesList[1] == ("default_light", "Default Light Theme")
|
||||
assert themesList[2] == ("default", "Qt Default Theme")
|
||||
assert themesList[2] == ("cyberpunk_night", "Cyberpunk Night")
|
||||
assert themesList[3] == ("default", "Qt Default Theme")
|
||||
|
||||
# A second call should returned the cached list
|
||||
assert mainTheme.listThemes() == mainTheme._themeList
|
||||
|
||||
Reference in New Issue
Block a user