Fix windows path

This commit is contained in:
Veronica Berglyd Olsen
2024-11-24 02:53:54 +01:00
parent 9ec9c55c3f
commit 32d899dbfb
+7 -3
View File
@@ -436,6 +436,10 @@ def testCoreTree_ToCFile(monkeypatch, fncPath, mockGUI, mockItems):
mp.setattr("builtins.open", causeOSError)
assert tree.writeToCFile() is False
pathA = str(Path("content") / "000000000000c.nwd")
pathB = str(Path("content") / "000000000000e.nwd")
pathC = str(Path("content") / "000000000000f.nwd")
# Allow writing
assert tree.writeToCFile() is True
assert (fncPath / nwFiles.TOC_TXT).read_text() == (
@@ -445,7 +449,7 @@ def testCoreTree_ToCFile(monkeypatch, fncPath, mockGUI, mockItems):
"\n"
"File Name Class Layout Document Label\n"
"--------------------------------------------------------------\n"
"content/000000000000c.nwd NOVEL DOCUMENT Title Page\n"
"content/000000000000e.nwd NOVEL DOCUMENT New Chapter\n"
"content/000000000000f.nwd NOVEL DOCUMENT New Scene\n"
f"{pathA} NOVEL DOCUMENT Title Page\n"
f"{pathB} NOVEL DOCUMENT New Chapter\n"
f"{pathC} NOVEL DOCUMENT New Scene\n"
)