Fix windows path
This commit is contained in:
@@ -436,6 +436,10 @@ def testCoreTree_ToCFile(monkeypatch, fncPath, mockGUI, mockItems):
|
|||||||
mp.setattr("builtins.open", causeOSError)
|
mp.setattr("builtins.open", causeOSError)
|
||||||
assert tree.writeToCFile() is False
|
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
|
# Allow writing
|
||||||
assert tree.writeToCFile() is True
|
assert tree.writeToCFile() is True
|
||||||
assert (fncPath / nwFiles.TOC_TXT).read_text() == (
|
assert (fncPath / nwFiles.TOC_TXT).read_text() == (
|
||||||
@@ -445,7 +449,7 @@ def testCoreTree_ToCFile(monkeypatch, fncPath, mockGUI, mockItems):
|
|||||||
"\n"
|
"\n"
|
||||||
"File Name Class Layout Document Label\n"
|
"File Name Class Layout Document Label\n"
|
||||||
"--------------------------------------------------------------\n"
|
"--------------------------------------------------------------\n"
|
||||||
"content/000000000000c.nwd NOVEL DOCUMENT Title Page\n"
|
f"{pathA} NOVEL DOCUMENT Title Page\n"
|
||||||
"content/000000000000e.nwd NOVEL DOCUMENT New Chapter\n"
|
f"{pathB} NOVEL DOCUMENT New Chapter\n"
|
||||||
"content/000000000000f.nwd NOVEL DOCUMENT New Scene\n"
|
f"{pathC} NOVEL DOCUMENT New Scene\n"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user