Remove more redundant code

This commit is contained in:
Veronica Berglyd Olsen
2024-10-23 17:20:07 +02:00
parent 3712b2e93f
commit b01c91c0a3
2 changed files with 2 additions and 51 deletions
+1 -18
View File
@@ -20,8 +20,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
from __future__ import annotations
import json
import pytest
from PyQt5.QtGui import QFont
@@ -35,7 +33,7 @@ from novelwriter.formats.tokenizer import COMMENT_STYLE, HeadingFormatter, Token
from novelwriter.formats.tomarkdown import ToMarkdown
from novelwriter.formats.toraw import ToRaw
from tests.tools import C, buildTestProject, readFile
from tests.tools import C, buildTestProject
TMH = "0123456789abc"
TM1 = f"{TMH}:T0001"
@@ -237,21 +235,6 @@ def testFmtToken_TextOps(monkeypatch, mockGUI, mockRnd, fncPath):
tokens.doPreProcessing()
assert tokens._text == docTextR
# Save File
savePath = fncPath / "dump.nwd"
tokens.saveRawDocument(savePath, asJson=False)
assert readFile(savePath) == (
"#! Notes: Plot\n\n"
"#! Notes: Plot\n\n"
)
tokens.saveRawDocument(savePath, asJson=True)
assert json.loads(readFile(savePath))["text"] == {
"nwd": [
["#! Notes: Plot"],
["#! Notes: Plot"]
]
}
@pytest.mark.core
def testFmtToken_StripEscape():