Fix linting errors from updated Ruff version
This commit is contained in:
@@ -812,13 +812,13 @@ def testGuiMain_OpenClose(qtbot, monkeypatch, nwGUI, projPath, fncPath, mockRnd)
|
|||||||
# Handle broken index on project open
|
# Handle broken index on project open
|
||||||
nwGUI.closeProject()
|
nwGUI.closeProject()
|
||||||
idxPath: Path = projPath / "meta" / nwFiles.INDEX_FILE
|
idxPath: Path = projPath / "meta" / nwFiles.INDEX_FILE
|
||||||
assert idxPath.read_text() != "{}"
|
assert idxPath.read_text(encoding="utf-8") != "{}"
|
||||||
idxPath.write_text("{}")
|
idxPath.write_text("{}", encoding="utf-8")
|
||||||
assert idxPath.read_text() == "{}"
|
assert idxPath.read_text(encoding="utf-8") == "{}"
|
||||||
|
|
||||||
nwGUI.openProject(projPath)
|
nwGUI.openProject(projPath)
|
||||||
nwGUI.saveProject()
|
nwGUI.saveProject()
|
||||||
assert idxPath.read_text() != "{}"
|
assert idxPath.read_text(encoding="utf-8") != "{}"
|
||||||
assert nwGUI.docEditor.docHandle == C.hSceneDoc
|
assert nwGUI.docEditor.docHandle == C.hSceneDoc
|
||||||
assert nwGUI.docViewer.docHandle == C.hTitlePage
|
assert nwGUI.docViewer.docHandle == C.hTitlePage
|
||||||
|
|
||||||
|
|||||||
@@ -164,14 +164,14 @@ def testGuiTheme_Theme(qtbot, monkeypatch, nwGUI, tstPaths):
|
|||||||
# ===============
|
# ===============
|
||||||
|
|
||||||
mockTheme: Path = tstPaths.cnfDir / "themes" / "test.conf"
|
mockTheme: Path = tstPaths.cnfDir / "themes" / "test.conf"
|
||||||
mockTheme.write_text(
|
mockTheme.write_text((
|
||||||
"[Main]\n"
|
"[Main]\n"
|
||||||
"name = Test\n"
|
"name = Test\n"
|
||||||
"\n"
|
"\n"
|
||||||
"[Palette]\n"
|
"[Palette]\n"
|
||||||
"window = 0, 0, 0\n"
|
"window = 0, 0, 0\n"
|
||||||
"text = 255, 255, 255\n"
|
"text = 255, 255, 255\n"
|
||||||
)
|
), encoding="utf-8")
|
||||||
mainTheme._availThemes["test"] = mockTheme
|
mainTheme._availThemes["test"] = mockTheme
|
||||||
|
|
||||||
CONFIG.guiTheme = "test"
|
CONFIG.guiTheme = "test"
|
||||||
|
|||||||
Reference in New Issue
Block a user