From 7ec43e42fd83ad2188b06a5d9f29b3fe6113a612 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Tue, 1 Dec 2020 22:32:48 +0100 Subject: [PATCH] Fix flake8 and windows test --- tests/test_core_tree.py | 10 +++++++--- tests/test_project.py | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_core_tree.py b/tests/test_core_tree.py index 447ff1cc..f417fd6a 100644 --- a/tests/test_core_tree.py +++ b/tests/test_core_tree.py @@ -413,6 +413,10 @@ def testCoreTree_ToCFile(monkeypatch, dummyGUI, dummyItems, tmpDir): theProject.projPath = tmpDir assert theTree.writeToCFile() + pathA = os.path.join("content", "c000000000001.nwd") + pathB = os.path.join("content", "c000000000002.nwd") + pathC = os.path.join("content", "b000000000002.nwd") + with open(os.path.join(tmpDir, nwFiles.TOC_TXT), mode="r", encoding="utf8") as inFile: assert inFile.read() == ( "\n" @@ -421,9 +425,9 @@ def testCoreTree_ToCFile(monkeypatch, dummyGUI, dummyItems, tmpDir): "\n" "File Name Class Layout Document Label\n" "-------------------------------------------------------------\n" - "content/c000000000001.nwd NOVEL UNNUMBERED Chapter One\n" - "content/c000000000002.nwd NOVEL SCENE Scene One\n" - "content/b000000000002.nwd CHARACTER NOTE Jane Doe\n" + f"{pathA} NOVEL UNNUMBERED Chapter One\n" + f"{pathB} NOVEL SCENE Scene One\n" + f"{pathC} CHARACTER NOTE Jane Doe\n" ) # END Test testCoreTree_ToCFile diff --git a/tests/test_project.py b/tests/test_project.py index 75c72696..73c65f13 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -11,7 +11,6 @@ from zipfile import ZipFile from nwtools import cmpFiles from nw.core.project import NWProject -from nw.core.document import NWDoc from nw.core.spellcheck import NWSpellEnchant, NWSpellSimple from nw.constants import nwConst, nwItemClass, nwItemType, nwItemLayout, nwFiles