From 60f4031e1bee58a6845d1765f68eef9447e11d49 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 14 Jan 2017 11:03:46 +0530 Subject: [PATCH] Do not run the dictionaries test multiple times --- setup/test.py | 5 +---- src/calibre/spell/dictionary.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setup/test.py b/setup/test.py index 197850a960..760fd15b22 100644 --- a/setup/test.py +++ b/setup/test.py @@ -8,7 +8,7 @@ import unittest from setup import Command -TEST_MODULES = frozenset('srv db polish opf css docx cfi matcher icu smartypants build misc library dictionaries'.split()) +TEST_MODULES = frozenset('srv db polish opf css docx cfi matcher icu smartypants build misc library'.split()) def find_tests(which_tests=None): @@ -69,9 +69,6 @@ def find_tests(which_tests=None): if ok('library'): from calibre.library.test_cli import find_tests a(find_tests()) - if ok('dictionaries'): - from calibre.spell.dictionary import find_tests - a(find_tests()) tests = unittest.TestSuite(ans) return tests diff --git a/src/calibre/spell/dictionary.py b/src/calibre/spell/dictionary.py index c5e30447cd..15e459c9a8 100644 --- a/src/calibre/spell/dictionary.py +++ b/src/calibre/spell/dictionary.py @@ -391,7 +391,7 @@ class Dictionaries(object): if d is not None: try: - ans = d.obj.suggest(unicode(word)) + ans = d.obj.suggest(unicode(word).replace('\u2010', '-')) except ValueError: pass else: