Change format of wordlist.txt file to json
This commit is contained in:
@@ -37,18 +37,18 @@ def testCoreSpell_FakeEnchant(monkeypatch):
|
||||
mp.setitem(sys.modules, "enchant", None)
|
||||
spChk = NWSpellEnchant()
|
||||
spChk.setLanguage("en_US", "")
|
||||
assert isinstance(spChk._theDict, FakeEnchant)
|
||||
assert isinstance(spChk._dictObj, FakeEnchant)
|
||||
|
||||
# Request a non-existent dictionary
|
||||
spChk = NWSpellEnchant()
|
||||
spChk.setLanguage("whatchamajig", "")
|
||||
assert isinstance(spChk._theDict, FakeEnchant)
|
||||
assert isinstance(spChk._dictObj, FakeEnchant)
|
||||
|
||||
# Request an emety language string
|
||||
# See issue https://github.com/vkbo/novelWriter/issues/1096
|
||||
spChk = NWSpellEnchant()
|
||||
spChk.setLanguage("", "")
|
||||
assert isinstance(spChk._theDict, FakeEnchant)
|
||||
assert isinstance(spChk._dictObj, FakeEnchant)
|
||||
|
||||
# FakeEnchant should handle requests
|
||||
fkChk = FakeEnchant()
|
||||
@@ -96,7 +96,7 @@ def testCoreSpell_Enchant(monkeypatch, fncPath):
|
||||
|
||||
assert spChk._readProjectDictionary(None) is False
|
||||
assert spChk._readProjectDictionary(wList) is True
|
||||
assert spChk._projectDict == wList
|
||||
assert spChk._userDictPath == wList
|
||||
|
||||
# Cannot write to file
|
||||
with monkeypatch.context() as mp:
|
||||
|
||||
@@ -27,7 +27,6 @@ from PyQt5.QtWidgets import QDialog, QAction
|
||||
from tools import buildTestProject, writeFile, readFile, getGuiItem
|
||||
from mocked import causeOSError
|
||||
|
||||
from novelwriter.constants import nwFiles
|
||||
from novelwriter.dialogs.wordlist import GuiWordList
|
||||
|
||||
|
||||
@@ -43,7 +42,7 @@ def testDlgWordList_Dialog(qtbot, monkeypatch, nwGUI, projPath):
|
||||
|
||||
# Open project
|
||||
nwGUI.openProject(projPath)
|
||||
dictFile = projPath / "meta" / nwFiles.PROJ_DICT
|
||||
dictFile = projPath / "meta" / "wordlist.txt"
|
||||
|
||||
# Load the dialog
|
||||
nwGUI.mainMenu.aEditWordList.activate(QAction.Trigger)
|
||||
|
||||
@@ -28,7 +28,6 @@ from tools import getGuiItem, writeFile, buildTestProject
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QAction, QFileDialog
|
||||
|
||||
from novelwriter.constants import nwFiles
|
||||
from novelwriter.tools.writingstats import GuiWritingStats
|
||||
|
||||
|
||||
@@ -40,7 +39,7 @@ def testToolWritingStats_Main(qtbot, monkeypatch, nwGUI, projPath, tstPaths):
|
||||
buildTestProject(nwGUI, projPath)
|
||||
qtbot.wait(100)
|
||||
assert nwGUI.saveProject()
|
||||
sessFile = projPath / "meta" / nwFiles.SESS_STATS
|
||||
sessFile = projPath / "meta" / "sessionStats.log"
|
||||
|
||||
# Open the Writing Stats dialog
|
||||
nwGUI.mainMenu.aWritingStats.activate(QAction.Trigger)
|
||||
|
||||
Reference in New Issue
Block a user