Change format of wordlist.txt file to json

This commit is contained in:
Veronica Berglyd Olsen
2023-06-13 17:31:16 +02:00
parent 9ac61105f3
commit 0003f8c24d
8 changed files with 200 additions and 178 deletions
+4 -4
View File
@@ -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: