mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-06 13:24:36 +01:00
Delay load hunspell
This commit is contained in:
parent
49e3793909
commit
f4a93d2336
1 changed files with 10 additions and 1 deletions
|
|
@ -7,7 +7,6 @@
|
|||
import re
|
||||
import shutil
|
||||
import sys
|
||||
from calibre_extensions import hunspell
|
||||
from collections import defaultdict, namedtuple
|
||||
from functools import partial
|
||||
from itertools import chain
|
||||
|
|
@ -164,6 +163,7 @@ def get_dictionary(locale, exact_match=False):
|
|||
|
||||
|
||||
def load_dictionary(dictionary):
|
||||
from calibre_extensions import hunspell
|
||||
|
||||
def fix_path(path):
|
||||
if isinstance(path, bytes):
|
||||
|
|
@ -456,3 +456,12 @@ def test_dictionaries(self):
|
|||
self.assertIn('List', self.suggestions('Lis𝑘t'))
|
||||
|
||||
return unittest.TestLoader().loadTestsFromTestCase(TestDictionaries)
|
||||
|
||||
|
||||
def test():
|
||||
from calibre.utils.run_tests import run_cli
|
||||
run_cli(find_tests())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test()
|
||||
|
|
|
|||
Loading…
Reference in a new issue